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

enable_table_replication script cannot handle replication scope

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.3.1
    • None
    • Replication
    • None

    Description

      When you add a peer, then enable a table for replication using enable_table_replication, the script will create the table on the peer cluster, but with one difference:

      Master Cluster:

      hbase(main):027:0> describe 'testtable'
      Table testtable is ENABLED                                                                                                                                                                                  
      testtable                                                                                                                                                                                                   
      COLUMN FAMILIES DESCRIPTION                                                                                                                                                                                 
      {NAME => 'cf1', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '1', VERSIONS => '1', COMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL => 'FOREVER', KEEP_DELETED_CELLS => 'FALSE',
       BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}                                                                                                                                          
      1 row(s) in 0.0700 seconds
      

      Peer Cluster:

      hbase(main):003:0> describe 'testtable'
      Table testtable is ENABLED                                                                                                                                                                                  
      testtable                                                                                                                                                                                                   
      COLUMN FAMILIES DESCRIPTION                                                                                                                                                                                 
      {NAME => 'cf1', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '1', TTL => 'FOREVER', MIN_VERSIONS => '0', KEEP_DELETED_CELLS => 'FALSE',
       BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}                                                                                                                                          
      1 row(s) in 0.1260 seconds
      

      Note that the replication scope is different. Removing the peer, adding it again and enabling the table gives this now:

      hbase(main):026:0> enable_table_replication 'testtable'
      
      ERROR: Table testtable exists in peer cluster 1, but the table descriptors are not same when compared with source cluster. Thus can not enable the table's replication switch.
      

      That is dumb, as it was the same script that enabled the replication scope in the first place. It should skip that particular attribute when comparing the cluster schemas.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              larsgeorge Lars George
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: