7c00 commented on a change in pull request #951:
URL: https://github.com/apache/parquet-mr/pull/951#discussion_r827693142
##########
File path:
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/util/HadoopStreams.java
##########
@@ -66,6 +67,15 @@ public static SeekableInputStream wrap(FSDataInputStream
stream) {
}
}
+ private static boolean isWrappedStreamByteBufferReadable(FSDataInputStream
stream) {
+ InputStream wrapped = stream.getWrappedStream();
+ if (wrapped instanceof FSDataInputStream) {
+ return isWrappedStreamByteBufferReadable(((FSDataInputStream) wrapped));
Review comment:
Yes, it could be. But it may be hard to create such a case. As its code
shows, FSDataInputStream is a wrapper class of an inputstream. When we check
the wrapped inputstream recursively, it would finally reach an inputstream
whose type is not FSDataInputStream. A developer could override
`getWrappedStream` as `return this` to cause an infinite loop, while this makes
no sence.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]