Repository navigation
Conversation
|
Looks like this changes a return type: |
|
Interesting! |
There was a problem hiding this comment.
Thanks for the cleanup, this looks good to me. The reflection only ever guarded against Hadoop 1.x, and we already link against DirectDecompressionCodec directly in Lz4RawCodec, so this was dead weight. I ran TestDirectCodecFactory locally as well, all green.
One small behavior change worth being aware of: an IOException thrown by a native direct decompressor now surfaces as an IOException instead of being wrapped in a ParquetCompressionCodecException via InvocationTargetException. That is an improvement since it matches the heap path and the BytesDecompressor contract, just noting it.
| supportDirectDecompressor = false; | ||
| if (LOG.isDebugEnabled()) { | ||
| LOG.debug(String.format( | ||
| BYTE_BUF_IMPL_NOT_FOUND_MSG, |
There was a problem hiding this comment.
Pre-existing, but since you are here anyway: the argument on the next line should be "direct decompressor" instead of "compressor", this is the direct decompressor branch.
| @@ -589,11 +558,7 @@ public Object makeObject() throws Exception { | |||
| public Object borrowDirectDecompressor() { | |||
There was a problem hiding this comment.
Optional: since DirectCodecFactory is package-private, another way to deal with the japicmp complaint is to add excludes for org.apache.parquet.hadoop.DirectCodecFactory$DirectCodecPool$CodecPool#borrowDirectDecompressor() and org.apache.parquet.hadoop.DirectCodecFactory$DirectCodecPool#returnDirectDecompressor(java.lang.Object) to the japicmp config in the root pom. Then this can return DirectDecompressor and the cast in the FullDirectDecompressor constructor goes away. Keeping Object is fine with me too.
…odecFactory.java Co-authored-by: Fokko Driesprong <fokko@apache.org>
…odecFactory.java Co-authored-by: Fokko Driesprong <fokko@apache.org>
|
Thanks @Fokko, I went with your suggestions but did decide not to add to japicmp exception list and just stick with the prior return type. |
11 years ago we needed this, but not anymore since we only support Hadoop 3.x.
DirectCodecFactoryis package private so these are not breaking changes.