HBase
  1. HBase
  2. HBASE-1739

hbase-1683 broke splitting; only split three logs no matter what N was.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.20.0
    • Component/s: None
    • Labels:
      None

      Description

      There's a hard-coding in HLog#splitLog that presumes we always read in batches of ten logs:

      Index: src/java/org/apache/hadoop/hbase/regionserver/HLog.java
      ===================================================================
      --- src/java/org/apache/hadoop/hbase/regionserver/HLog.java     (revision 799653)
      +++ src/java/org/apache/hadoop/hbase/regionserver/HLog.java     (working copy)
      @@ -860,7 +860,7 @@
               // Stop at logfiles.length when it's the last step
               int endIndex = step == maxSteps - 1? logfiles.length: 
                 step * concurrentLogReads + concurrentLogReads;
      -        for (int i = (step * 10); i < endIndex; i++) {
      +        for (int i = (step * concurrentLogReads); i < endIndex; i++) {
                 // Check for possibly empty file. With appends, currently Hadoop 
                 // reports a zero length even if the file has been sync'd. Revisit if
                 // HADOOP-4751 is committed.
      

      When I changed it so we default to reading 3 files at a time rather than 10 over in hbase-1683, the hard-coding made it so we didn't read all logs.

        Activity

        Hide
        stack added a comment -

        Applied trunk and 0.20 branch.

        Show
        stack added a comment - Applied trunk and 0.20 branch.
        Hide
        stack added a comment -

        Committed after testing.

        Show
        stack added a comment - Committed after testing.

          People

          • Assignee:
            stack
            Reporter:
            stack
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development