[ https://issues.apache.org/jira/browse/HBASE-22005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16787452#comment-16787452 ]
Zheng Hu commented on HBASE-22005: ---------------------------------- OK, [~ste...@apache.org], Got your mind. Then I think we need an method in FSDataInputStream to known whether it support the ByteBufferReadable or not. Now I can only write an method like this to check, while I don't think it's efficient or good desgin. {code} static boolean isByteBufferReadable(FSDataInputStream is) { InputStream cur = is.getWrappedStream(); for (;;) { if ((cur instanceof FSDataInputStream)) { cur = ((FSDataInputStream) cur).getWrappedStream(); } else { break; } } return cur instanceof ByteBufferReadable; } {code} > Use ByteBuff's refcnt to track the life cycle of data block > ----------------------------------------------------------- > > Key: HBASE-22005 > URL: https://issues.apache.org/jira/browse/HBASE-22005 > Project: HBase > Issue Type: Sub-task > Reporter: Zheng Hu > Assignee: Zheng Hu > Priority: Major > Attachments: HBASE-22005.HBASE-21879.v1.patch > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)