无法在 HBase 中更改列
Cannot ALTER column in HBase
这是一个 HBase 新手问题。我在 HBase (1.2.6) 中有一个 table:
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
知道为什么会这样吗?
经过一些实验,我确实发现了问题。 hbase-site.xml中hbase.column.max.version的默认值是1。显然,如果它保持这样,所有尝试设置更多的版本会因神秘错误而失败。
将此参数设置为大于 1 的值可以解决问题。
我遇到了同样的问题,但找到了不同的解决方案。我居然没有在hbase-site.xml.
中找到config
我的解决方案是先禁用 table,然后再更改它。
禁用后,我可以更改 # 版本。
这是一个 HBase 新手问题。我在 HBase (1.2.6) 中有一个 table:
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
知道为什么会这样吗?
经过一些实验,我确实发现了问题。 hbase-site.xml中hbase.column.max.version的默认值是1。显然,如果它保持这样,所有尝试设置更多的版本会因神秘错误而失败。 将此参数设置为大于 1 的值可以解决问题。
我遇到了同样的问题,但找到了不同的解决方案。我居然没有在hbase-site.xml.
中找到config我的解决方案是先禁用 table,然后再更改它。 禁用后,我可以更改 # 版本。