您好,登錄后才能下訂單哦!
本篇內容介紹了“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.<init>(TableEventHandler.java:70)
at org.apache.hadoop.hbase.master.handler.TableDeleteFamilyHandler.<init>(TableDeleteFamilyHandler.java:40)
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刪除列族報錯怎么辦”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識可以關注億速云網站,小編將為大家輸出更多高質量的實用文章!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。