在hbase中创建表和插入数据时出错

mfuanj7w  于 2021-06-08  发布在  Hbase
关注(0)|答案(1)|浏览(2098)

我已经用./bin/hbase shell启动了hbase,在hbase shell中,我开始用创建表

create '/user/mapr/newtable2', wwww

但在那个时候它的错误表现为

ERROR: Table must have at least one column family

然后在向表中添加数据时使用

put 'newtable','2','countrydetail:city','chennai'

但它也显示了错误

ERROR: Failed 1 action: newtable: 1 time

数据没有插入到表中。请参考以下图片。

pokxtpni

pokxtpni1#

hbase table create命令应该是

create '<table_name>', '<column_family_name>'

在你的情况下,就像你 special characters 在表名中,它将给出错误

ERROR: Illegal character code:47, </> at 0. User-space table qualifiers may only contain 'alphanumeric characters' and digits: /user/mapr/newtable2


尝试使用 alphanumeric characters 在表名和列限定符名中

相关问题