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

enable_table_replication can not perform cyclic replication of a table

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0, 2.0.0
    • Component/s: Replication
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      The enable_table_replication operation is broken for cyclic replication of HBase table as we compare all the properties of column families (including REPLICATION_SCOPE).
      Below is exactly what happens:
      1. Running "enable_table_replication 'table1' " opeartion on first cluster will set the REPLICATION_SCOPE of all column families to peer id '1'. This will also create a table on second cluster where REPLICATION_SCOPE is still set to peer id '0'.

      2. Now when we run "enable_table_replication 'table1'" on second cluster, we compare all the properties of table (including REPLICATION_SCOPE_, which obviously is different now.

      I am proposing a fix for this issue where we should avoid comparing REPLICATION_SCOPE inside HColumnDescriotor::compareTo() method, especially when replication is not already enabled on the desired table.

      I have made that change and it is working. I will submit the patch soon.

        Attachments

        1. HBASE-17460.patch
          2 kB
          NITIN VERMA
        2. HBASE-17460_v2.patch
          12 kB
          NITIN VERMA
        3. HBASE-17460_v3.patch
          10 kB
          NITIN VERMA
        4. HBASE-17460_v4.patch
          10 kB
          NITIN VERMA
        5. 17460.branch-1.v3.txt
          9 kB
          Ted Yu
        6. 17460.v5.txt
          11 kB
          Ted Yu
        7. 17460-addendum.txt
          7 kB
          Ted Yu
        8. 17460-addendum.v2.txt
          7 kB
          Ted Yu
        9. HBASE-17460-branch-1-v5-plusaddendum-v2.patch
          19 kB
          Janos Gub
        10. HBASE-17460-addendum2.patch
          2 kB
          Janos Gub
        11. HBASE-17460-addendum2-v2.patch
          6 kB
          Janos Gub
        12. HBASE-17460-addendum2-v3.patch
          7 kB
          Janos Gub
        13. HBASE-17460-addendum2-v4.patch
          4 kB
          Janos Gub
        14. HBASE-17460-branch-1-v5-addendumv2-addendum2v4.patch
          9 kB
          Janos Gub
        15. HBASE-17460-branch-1-v5-addendumv2-addendum2v4-v2.patch
          9 kB
          Janos Gub

          Issue Links

            Activity

              People

              • Assignee:
                nitin.verma@gmail.com NITIN VERMA
                Reporter:
                nitin.verma@gmail.com NITIN VERMA
              • Votes:
                0 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 96h
                  96h
                  Remaining:
                  Remaining Estimate - 96h
                  96h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified