2017-09-18 65 views
-1

這是一個新手HBase問題。我在HBase的(1.2.6)的表:HBase中無法更改列

hbase(main):042:0> create 'ship', 'cf1' 
0 row(s) in 1.2200 seconds 
=> Hbase::Table - ship 

它創建:

hbase(main):046:0> desc 'ship' 
Table ship is ENABLED 
ship 
COLUMN FAMILIES DESCRIPTION 
{NAME => 'cf1', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', 
KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', 
TTL => 'FOREVER', COMPRESSION => 'NONE', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} 
1 row(s) in 0.0110 seconds 

但我不能改變它:

hbase(main):047:0> alter 'ship', NAME=>'cf1', VERSIONS=>5 
Unknown argument ignored: cf1 
Unknown argument ignored: VERSIONS 
Updating all regions with the new schema... 
1/1 regions updated. 
Done. 
0 row(s) in 1.8710 seconds 

任何想法,爲什麼發生這種情況?

回答

1

經過一番實驗,我確實發現了這個問題。默認值爲hbase.column.max.version in hbase-site.xml is 1.顯然,如果它仍然是這樣,所有設置更高版本數的嘗試都會失敗並帶有隱蔽錯誤。 將此參數設置爲大於1的值可解決此問題。