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

Backport patches in HBASE-18410 to branch-1.x branches.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: Filters
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      This change fixes bugs in FilterList, and also does a code refactor which ensures interface compatibility.

      The primary bug fixes are :
      1. For sub-filter in FilterList with MUST_PASS_ONE, if previous filterKeyValue() of sub-filter returns NEXT_COL, we cannot make sure that the next cell will be the first cell in next column, because FilterList choose the minimal forward step among sub-filters, and it may return a SKIP. so here we add an extra check to ensure that the next cell will match preivous return code for sub-filters.
      2. Previous logic about transforming cell of FilterList is incorrect, we should set the previous transform result (rather than the given cell in question) as the initial vaule of transform cell before call filterKeyValue() of FilterList.
      3. Handle the ReturnCodes which the previous code did not handle.

      About code refactor, we divided the FilterList into two separated sub-classes: FilterListWithOR and FilterListWithAND, The FilterListWithOR has been optimised to choose the next minimal step to seek cell rather than SKIP cell one by one, and the FilterListWithAND has been optimised to choose the next maximal key to seek among sub-filters in filter list. All in all, The code in FilterList is clean and easier to follow now.

      Note that ReturnCode NEXT_ROW has been redefined as skipping to next row in current family, not to next row in all family. it’s more reasonable, because ReturnCode is a concept in store level, not in region level.
      Show
      This change fixes bugs in FilterList, and also does a code refactor which ensures interface compatibility. The primary bug fixes are : 1. For sub-filter in FilterList with MUST_PASS_ONE, if previous filterKeyValue() of sub-filter returns NEXT_COL, we cannot make sure that the next cell will be the first cell in next column, because FilterList choose the minimal forward step among sub-filters, and it may return a SKIP. so here we add an extra check to ensure that the next cell will match preivous return code for sub-filters. 2. Previous logic about transforming cell of FilterList is incorrect, we should set the previous transform result (rather than the given cell in question) as the initial vaule of transform cell before call filterKeyValue() of FilterList. 3. Handle the ReturnCodes which the previous code did not handle. About code refactor, we divided the FilterList into two separated sub-classes: FilterListWithOR and FilterListWithAND, The FilterListWithOR has been optimised to choose the next minimal step to seek cell rather than SKIP cell one by one, and the FilterListWithAND has been optimised to choose the next maximal key to seek among sub-filters in filter list. All in all, The code in FilterList is clean and easier to follow now. Note that ReturnCode NEXT_ROW has been redefined as skipping to next row in current family, not to next row in all family. it’s more reasonable, because ReturnCode is a concept in store level, not in region level.

      Attachments

      1. HBASE-18993-branch-1.4.v1.patch
        98 kB
        Zheng Hu
      2. HBASE-18993-branch-1.4.v1.patch
        98 kB
        Zheng Hu
      3. HBASE-18993-branch-1.1.v1.patch
        98 kB
        Zheng Hu
      4. HBASE-18993-branch-1.2.v1.patch
        98 kB
        Zheng Hu
      5. HBASE-18993-branch-1.3.v1.patch
        97 kB
        Zheng Hu
      6. HBASE-18993-branch-1.4.v1.patch
        98 kB
        Zheng Hu
      7. HBASE-18993-branch-1.4.v2.patch
        98 kB
        Zheng Hu
      8. HBASE-18993-branch-1.3.v2.patch
        97 kB
        Zheng Hu
      9. HBASE-18993-branch-1.2.v2.patch
        98 kB
        Zheng Hu
      10. HBASE-18993-branch-1.1.v2.patch
        98 kB
        Zheng Hu

        Issue Links

          Activity

            People

            • Assignee:
              openinx Zheng Hu
              Reporter:
              openinx Zheng Hu
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: