我有一个 Hbase 表:'employeedetails' 列族:'personaldetails','professionaldetails'
当我尝试为多个列族编写 put 时,如下所示:
put 'employeedetails','1','personaldetails:firstname','Steven','personaldetails:lastname','Gerrard','professionaldetails:company','ABC','professionaldetails:empid','123abc'
我收到错误信息:
ERROR: wrong number of arguments (10 for 6)
Here is some help for this command:
Put a cell 'value' at specified table/row/column and optionally
timestamp coordinates. To put a cell value into table 'ns1:t1' or 't1'
at row 'r1' under column 'c1' marked with the time 'ts1', do:
但如果我将数据一一放入 ColumnFamily 的列中,它就可以工作。
hbase(main):040:0> put 'employeedetails','1','personaldetails:firstname','Steven'
0 row(s) in 0.0190 seconds
任何人都可以告诉我在为多个列族编写时是否犯了任何错误,或者一次编写多个列族的概念有什么不同。
最佳答案
在Hbase中,你不能一次写多个列限定符。
Put 用于将单个单元格值写入 Hbase 表。
Put a cell ‘value’ at specified table/row/column and optionally timestamp coordinates.
将您的 put
语句拆分为多个单独的 put
语句。
关于hadoop - 写入Hbase表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43139586/