Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

New to HBase, having issues with alter command

I am not able to alter the column details in Hbase. I even tried to disable to table before trying to alter the table, that too did not work. I am getting the following error :

Exception `TypeError' at /home/anusha_guruprasad/cloud-bigtable-examples/quickstart/thirdparty/ruby/hbase/admin.rb:667 - cannot convert instance of class org.jruby.RubyString to class org.apache.hadoop.hbase.TableName

ERROR: cannot convert instance of class org.jruby.RubyString to class org.apache.hadoop.hbase.TableName

Could any one help me with the issue? 

 

Solved Solved
0 1 334
1 ACCEPTED SOLUTION

According to this github post, the Alter command from HBase seems to be failing and currently fixing the issue. This functionality was there but a change broke it. And as per Solomon's comment, a workaround for this is to use the CBT Tool. You'll need to use the `createfamily` and `setgcpolicy` commands to add a new family.

You might also try to use these steps as a guide:
- Use the `setgcpolicy` command from cbt tool reference to set the number of versions.
- Run `$ cbt listinstances to find all instances`
- Run `$ cbt -instance="YOUR_BT_INSTANCE" setgcpolicy TABLE_NAME COLUMN_FAMILY maxversions=10`, where YOUR_BT_INSTANCE is the name of the instance that contains your table.

View solution in original post

1 REPLY 1

According to this github post, the Alter command from HBase seems to be failing and currently fixing the issue. This functionality was there but a change broke it. And as per Solomon's comment, a workaround for this is to use the CBT Tool. You'll need to use the `createfamily` and `setgcpolicy` commands to add a new family.

You might also try to use these steps as a guide:
- Use the `setgcpolicy` command from cbt tool reference to set the number of versions.
- Run `$ cbt listinstances to find all instances`
- Run `$ cbt -instance="YOUR_BT_INSTANCE" setgcpolicy TABLE_NAME COLUMN_FAMILY maxversions=10`, where YOUR_BT_INSTANCE is the name of the instance that contains your table.