Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-23271

HFileReader get split point handle empty HFile better

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 3.0.0-alpha-1, 1.1.7
    • None
    • regionserver

    Description

      currenttly if we call org.apache.hadoop.hbase.io.hfile.HFileReaderImpl#midKey on an empty HFile, we got an exception like

       java.io.IOException: HFile empty

      since the function return an Optional<Cell> , I think it's better return Optional.empty() instead of throw An Exception

      when a region with muiltiple column family grow big enough to be splited, if got some empty column family, will got some warn log like this

      java.io.IOException: HFile empty at org.apache.hadoop.hbase.io.hfile.HFileBlockIndex$BlockIndexReader.midkey(HFileBlockIndex.java:334)

      sinece exception is catched,  split logic will go on and got right result

      Attachments

        1. HBASE-23271.patch
          4 kB
          qiang Liu

        Activity

          People

            iamgd67 qiang Liu
            iamgd67 qiang Liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: