简单的问题,我想创建如下表格,你能告诉我为什么这个命令不起作用吗?
hbase(main):004:0> create 'test', {NAME => 'test', INDEX => 'test'}
NameError: uninitialized constant INDEX
答案 0 :(得分:0)
你想用INDEX => 'test'
做什么?据我所知,财产不存在:
http://wiki.apache.org/hadoop/Hbase/Shell
create Create table; pass table name, a dictionary of specifications per
column family, and optionally a dictionary of table configuration.
Dictionaries are described below in the GENERAL NOTES section.
Examples:
hbase> create 't1', {NAME => 'f1', VERSIONS => 5}
hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
hbase> # The above in shorthand would be the following:
hbase> create 't1', 'f1', 'f2', 'f3'
hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, \
BLOCKCACHE => true}
只需create 'test', 'test'
或create 'test', {NAME => 'test'}