如何将值放入hbase中的多个列族中 [英] How to put values inside multiple column families in hbase
问题描述
我正在寻找一个hbase put命令,它可以为hbase表中的同一个rowkey插入多个列族
假设我有一个名为'emp'与两列系列,如'个人'和'教育'
我正在应用下面的命令。它会抛出一些语法错误。
pre $放置'emp','100','personal:name','SURENDER','educational :degree','BTECH'
错误:没有方法'添加'参数(org.jruby.java.proxies.ArrayJavaProxy,org.jruby.java.proxies.ArrayJavaProxy,org.jruby.RubyString ,org.jruby.java.proxies.ArrayJavaProxy)on Java :: OrgApacheHadoopHbaseClient :: Put
但是,如果尝试为每个列家庭单独放置命令,然后运行。
put'emp','100','personal:name', 'SURENDER'
放'emp','100','educational:degree','BTECH'
有人可以告诉我,当我尝试对2列家族应用put命令时出了什么问题吗? 不可能。 Put只能用于插入单个值。
I am looking for a hbase put command that can insert values into multiple column families for a same rowkey in hbase table
Let's say I have a hbase table named 'emp' with two column families such as 'personal' and 'educational'
I am applying the below command . It throws some syntax error
put 'emp' ,'100', 'personal:name', 'SURENDER', 'educational:degree', 'BTECH'
ERROR: no method 'add' for arguments (org.jruby.java.proxies.ArrayJavaProxy,org.jruby.java.proxies.ArrayJavaProxy,org.jruby.RubyString,org.jruby.java.proxies.ArrayJavaProxy) on Java::OrgApacheHadoopHbaseClient::Put
However if try separate put commands for each column family then it works
put 'emp', '100' ,'personal:name', 'SURENDER'
put 'emp', '100', 'educational:degree', 'BTECH'
Could anybody tell me what went wrong when I try to apply put command for 2 column families?
That is not possible. Put can only be applied to insert a single value.
这篇关于如何将值放入hbase中的多个列族中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!