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

Redo the getMidPoint() in HFileWriterImpl to get rid of the double comparison process

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1, 2.5.0
    • None
    • None
    • Reviewed

    Description

      There is a TODO like this "TODO: Redo so only a single pass over the arrays rather than one to  compare and then a second composing midpoint." in getMidpoint()  of class ​HFileWriteImpl​
       
      The old logic compares the left byte array and the right byte array twice: 

      1. A comparison is performed before composing MinimumMidpointArray
      2. During composing of MinimumMidpointArray, bytes were comparing again

       
      My optimization  combines them into one

      Attachments

        Issue Links

          Activity

            People

              GeorryHuang Zhuoyue Huang
              GeorryHuang Zhuoyue Huang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: