Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12724

Let BufferedFSInputStream implement CanUnbuffer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      When trying to determine reason for test failure over in HBASE-9393, I saw the following exception:

      testSeekTo[4](org.apache.hadoop.hbase.io.hfile.TestSeekTo)  Time elapsed: 0.033 sec  <<< ERROR!
      java.lang.UnsupportedOperationException: this stream does not support unbuffering.
      	at org.apache.hadoop.fs.FSDataInputStream.unbuffer(FSDataInputStream.java:229)
      	at org.apache.hadoop.fs.FSDataInputStream.unbuffer(FSDataInputStream.java:227)
      	at org.apache.hadoop.hbase.io.hfile.HFile.pickReaderVersion(HFile.java:518)
      	at org.apache.hadoop.hbase.io.hfile.HFile.createReader(HFile.java:562)
      	at org.apache.hadoop.hbase.io.hfile.TestSeekTo.testSeekToInternals(TestSeekTo.java:307)
      	at org.apache.hadoop.hbase.io.hfile.TestSeekTo.testSeekTo(TestSeekTo.java:298)
      

      Here is the cause:

      java.lang.ClassCastException: org.apache.hadoop.fs.BufferedFSInputStream cannot be cast to org.apache.hadoop.fs.CanUnbuffer
      

      See the comments starting with https://issues.apache.org/jira/browse/HBASE-9393?focusedCommentId=15105939&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15105939 for background on the HBase patch.

      This issue is to make BufferedFSInputStream implement CanUnbuffer.

      This would benefit hbase unit tests.

      Thanks to cmccabe for discussion.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: