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_r337827458
##########
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 Changed with
AnInterface.class.isAssignableFrom(anInstance.getClass()) please review again.
Thanks!
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services