HBase
  1. HBase
  2. HBASE-9218

HBase shell does not allow to change/assign custom table-column families attributes

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Later
    • Affects Version/s: 0.94.6.1
    • Fix Version/s: None
    • Component/s: shell, Usability
    • Labels:
      None

      Description

      HBase shell. In 0.94.6.1 the attempt to assign/change custom table or CF attribute does not throw any exception but has no affect. The same code works fine in Java API (on HTableDescriptor or HColumnDescriptor)

      This is short shell session snippet:

      hbase(main):009:0> disable 'T'
      0 row(s) in 18.0730 seconds
      
      hbase(main):010:0> alter 'T', NAME => 'df', 'FAKE' => '10'
      Updating all regions with the new schema...
      5/5 regions updated.
      Done.
      0 row(s) in 2.2900 seconds
      
      hbase(main):011:0> enable 'T'
      0 row(s) in 18.7140 seconds
      
      hbase(main):012:0> describe 'T'
      DESCRIPTION                                                                                                            ENABLED
       {NAME => 'T', FAMILIES => [{NAME => 'df', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER = true
       > 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESSION => 'GZ', MIN_VERSIONS => '0', TTL => '2147483647', K
       EEP_DELETED_CELLS => 'false', BLOCKSIZE => '65536', IN_MEMORY => 'true', ENCODE_ON_DISK => 'true', BLOCKCACHE => 'tru
       e'}]}
      

      As you can see, the new attribute 'FAKE' has not been added to column family 'cf'.

        Activity

        Hide
        Lars Hofhansl added a comment -

        Nobody stepped up with a fix for 7 months. Closing with "later". We can bring it back if somebody signs up to work on this.

        Show
        Lars Hofhansl added a comment - Nobody stepped up with a fix for 7 months. Closing with "later". We can bring it back if somebody signs up to work on this.
        Hide
        Vasu Mariyala added a comment -

        Lars Hofhansl Started making the changes. Will upload the patch soon.

        Show
        Vasu Mariyala added a comment - Lars Hofhansl Started making the changes. Will upload the patch soon.
        Hide
        Lars Hofhansl added a comment -

        Vasu Mariyala, feel like looking into a patch for this?

        Show
        Lars Hofhansl added a comment - Vasu Mariyala , feel like looking into a patch for this?
        Hide
        Lars Hofhansl added a comment -

        Somebody make a patch, please.

        Show
        Lars Hofhansl added a comment - Somebody make a patch, please.
        Hide
        stack added a comment -

        https://issues.apache.org/jira/browse/HBASE-7571 made this work in 0.96 and trunk. This issue then becomes about backporting that fix or part of that fix.

        Show
        stack added a comment - https://issues.apache.org/jira/browse/HBASE-7571 made this work in 0.96 and trunk. This issue then becomes about backporting that fix or part of that fix.
        Hide
        stack added a comment -

        Check good in 0.96 too.

        Show
        stack added a comment - Check good in 0.96 too.
        Hide
        Ramon Wang added a comment -

        I had the same problem when i trying to execute a 'alter' command, here is the cmd:

        alter 'SPLIT_TEST_BIG',

        {METHOD => 'table_att', 'SPLIT_POLICY' => 'org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy'}

        The split policy is not changed for table 'SPLIT_TEST_BIG', by digging the code, i found HTableDescriptor.getRegionSplitPolicyClassName in method HRegion.initializeRegionInternals always returns null.

        The HBase i'm using is 0.94.6-cdh4.4.0.

        Show
        Ramon Wang added a comment - I had the same problem when i trying to execute a 'alter' command, here is the cmd: alter 'SPLIT_TEST_BIG', {METHOD => 'table_att', 'SPLIT_POLICY' => 'org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy'} The split policy is not changed for table 'SPLIT_TEST_BIG', by digging the code, i found HTableDescriptor.getRegionSplitPolicyClassName in method HRegion.initializeRegionInternals always returns null. The HBase i'm using is 0.94.6-cdh4.4.0.
        Hide
        Vladimir Rodionov added a comment -

        This is ruby stuff I am not familiar with. Can someone give me direction I will try to fix it myself.

        Show
        Vladimir Rodionov added a comment - This is ruby stuff I am not familiar with. Can someone give me direction I will try to fix it myself.
        Hide
        stack added a comment -

        Hmm... I thought this worked. Let me take look...

        Show
        stack added a comment - Hmm... I thought this worked. Let me take look...
        Hide
        Vladimir Rodionov added a comment -

        Having ability to control custom table/CF attributes through HBase shell is a nice feature to have (coprocessors can introduce custom attributes, for example).

        Show
        Vladimir Rodionov added a comment - Having ability to control custom table/CF attributes through HBase shell is a nice feature to have (coprocessors can introduce custom attributes, for example).

          People

          • Assignee:
            Unassigned
            Reporter:
            Vladimir Rodionov
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development