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(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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15498/viewspace-2134473/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- VUE—刪除HelloWorld.vue後報錯 `--fix` option報錯的解決Vue
- 直接分離刪除日誌檔案後附加報錯的簡單解決方法
- 陣列的方法-新增刪除陣列
- python 使用 delete 方法時報錯,可以正常刪除Pythondelete
- hbase 恢復 誤刪除
- 資料夾刪除不了怎麼辦?資料夾刪除不了的解決方法
- dbfread報錯ValueError錯誤解決方法Error
- hive使用報錯解決方法Hive
- PHP從陣列中刪除元素的方法PHP陣列
- 關於集合遍歷並刪除報錯詳解
- 刪除大量檔案Argument list too long錯誤解決
- win10強制刪除資料夾的解決方法Win10
- win10強制刪除dll檔案的解決方法Win10
- JS刪除陣列裡的某個元素方法JS陣列
- 刪除事件(解綁事件)/ 刪除事件相容性解決方案事件
- Nginx報504 gateway timeout錯誤的解決方法NginxGateway
- 下載HuggingFace模型的方法以及報錯解決模型
- ceph叢集安裝報錯解決方法
- Django2.2 報錯:UnicodeDecodeError 解決方法DjangoUnicodeError
- 【HBase】誤刪除資料怎麼辦?
- 電腦刪除檔案速度很慢怎麼辦?電腦刪除檔案速度慢的解決方法
- list增強for迴圈刪除元素報錯
- SS報錯的解決
- Nginx 報錯 504 Gateway Time-out 的解決方法NginxGateway
- kaldi的編譯安裝與報錯解決方法編譯
- 查詢陣列裡資料刪除和增加的方法陣列
- 日常python報錯及解決方法記錄Python
- VSCode除錯Flutter的問題解決VSCode除錯Flutter
- 用命令列啟動 docker 報錯:Redirecting to /bin/systemctl start docker.service 解決方法命令列Docker
- Flutter的命令列除錯Flutter命令列除錯
- MYSQL日誌的正確刪除方法詳解MySql
- win10磁碟清理臨時檔案無法刪除的解決方法Win10
- 在迴圈陣列時使用splice()方法刪除陣列遇到的問題陣列
- mac檔案刪除不了的解決辦法Mac
- docker pull下載映象時的報錯及其解決方法Docker
- mysql登入報錯提示:ERROR 1045 (28000)的解決方法MySqlError
- redis lRem 刪除失敗?(已解決)RedisREM
- imagick使用readImage報錯 Failed to read the file 或者沒有報錯內容的解決方法AI
- 國內electron-vue build報錯解決方法VueUI