Fokko commented on code in PR #1084: URL: https://github.com/apache/parquet-mr/pull/1084#discussion_r1183079903
########## parquet-hadoop/src/main/java/org/apache/parquet/hadoop/util/HadoopStreams.java: ########## @@ -37,6 +41,39 @@ public class HadoopStreams { private static final Logger LOG = LoggerFactory.getLogger(HadoopStreams.class); + private static final Class<?> byteBufferReadableClass = getReadableClass(); + static final Constructor<SeekableInputStream> h2SeekableConstructor = getH2SeekableConstructor(); Review Comment: Yes, I copied most from the old code to avoid refactoring. I think we can greatly simplify it because it was still taking Hadoop1 into account. We still have to check if the wrapped stream is ByteBufferReadable: https://github.com/apache/hadoop/blob/release-2.4.1/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSDataInputStream.java#L142-L148 The `hasCapabilities does the same but in a more elegant way. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@parquet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org