zhaoyim commented on a change in pull request #746: HBASE-23195 FSDataInputStreamWrapper unbuffer can NOT invoke the clas… URL: https://github.com/apache/hbase/pull/746#discussion_r337596746
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.java ########## @@ -247,6 +248,30 @@ public HFileSystem getHfs() { return this.hfs; } + /** + * + * @param clazz the class which need to check whether implements + * org.apache.hadoop.fs.CanUnbuffer + * @return is implements CanUnbuffer true: Yes, false: No + */ + @VisibleForTesting + public boolean isImplementsCanUnbuffer(Class<?> clazz){ + Class<?>[] interfaces = clazz.getInterfaces(); + if (interfaces.length != 0) { + for (Class<?> clz : interfaces) { + if (clz.getCanonicalName().toString().equals("org.apache.hadoop.fs.CanUnbuffer")) { Review comment: @jojochuang Thanks for the review! Try to do the modify tomorrow. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services