简体   繁体   中英

How to put values inside multiple column families in hbase

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM