HBase删除列族报错怎么办-创新互联
本篇内容介绍了“HBase删除列族报错怎么办”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
创新互联建站是一家集网站建设,新荣企业网站建设,新荣品牌网站建设,网站定制,新荣网站建设报价,网络营销,网络优化,新荣网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。今天做实验,删除member表某一列的时候,报错
hbase(main):003:0> alter 'member','delete'=>'info'
ERROR: org.apache.hadoop.hbase.TableNotDisabledException: org.apache.hadoop.hbase.TableNotDisabledException: member
at org.apache.hadoop.hbase.master.HMaster.checkTableModifiable(HMaster.java:1217)
at org.apache.hadoop.hbase.master.handler.TableEventHandler.
at org.apache.hadoop.hbase.master.handler.TableDeleteFamilyHandler.
at org.apache.hadoop.hbase.master.HMaster.deleteColumn(HMaster.java:1125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:364)
at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1326)
解决方案:先disable这张表:
hbase(main):005:0> disable 'member'
0 row(s) in 2.1560 seconds
然后再删除:
hbase(main):006:0> alter 'member', 'delete' => 'info'
Updating all regions with the new schema...
1/1 regions updated.
Done.
0 row(s) in 1.3370 seconds
查看表情况:
hbase(main):011:0> describe 'member'
DESCRIPTION ENABLED
{NAME => 'member', FAMILIES => [{NAME => 'address', BLOOMFILTER => 'NONE', REPLICATION_SCO true
PE => '0', VERSIONS => '3', COMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL => '2147483647
', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}, {NAME => 'member_id'
, BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '3', COMPRESSION => 'NONE',
MIN_VERSIONS => '0', TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLO
CKCACHE => 'true'}]}
1 row(s) in 0.0140 seconds
我们可以发现member表的info字段已经被删除了。
最后记得要启用表:
hbase(main):009:0> enable 'member'
0 row(s) in 2.2330 seconds
“HBase删除列族报错怎么办”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联-成都网站建设公司网站,小编将为大家输出更多高质量的实用文章!
当前题目:HBase删除列族报错怎么办-创新互联
当前网址:http://scyanting.com/article/cepgsh.html