You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Nihal Jain (JIRA)" <ji...@apache.org> on 2018/03/28 15:01:00 UTC

[jira] [Comment Edited] (HBASE-18999) Put in hbase shell cannot do multiple columns

    [ https://issues.apache.org/jira/browse/HBASE-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16417482#comment-16417482 ] 

Nihal Jain edited comment on HBASE-18999 at 3/28/18 3:00 PM:
-------------------------------------------------------------

Based on [ruby documentation|http://ruby-doc.org/core-2.2.2/Hash.html]
{quote}Hashes enumerate their values in the order that the corresponding keys were inserted.
{quote}
So, the key which is inserted first would overwrite the previous one.

 For example:
{code:java}
hbase(main):024:0> put 't1', 'row2', {'family1:column1'=>'a value1', 'family1:column1'=>'another value1', 'family2'=>'foobar1'}
Took 0.0020 seconds                                                                                                                            
hbase(main):025:0> scan 't1'
ROW                                  COLUMN+CELL                                                                                               
 row1                                column=family1:column1, timestamp=1522249091760, value=a value1                                           
 row1                                column=family2:, timestamp=1522249091760, value=foobar1                                                   
 row1                                column=family2:column2, timestamp=1522249091760, value=another value1                                     
 row2                                column=family1:column1, timestamp=1522249109960, value=another value1                                     
 row2                                column=family2:, timestamp=1522249109960, value=foobar1                                                   
2 row(s)
Took 0.0068 seconds                                                                                                                            
hbase(main):026:0> put 't1', 'row2', {'family2:column2'=>'a value1', 'family2:column2'=>'another value1', 'family2'=>'foobar1'}
Took 0.0042 seconds                                                                                                                            
hbase(main):027:0> scan 't1'
ROW                                  COLUMN+CELL                                                                                               
 row1                                column=family1:column1, timestamp=1522249091760, value=a value1                                           
 row1                                column=family2:, timestamp=1522249091760, value=foobar1                                                   
 row1                                column=family2:column2, timestamp=1522249091760, value=another value1                                     
 row2                                column=family1:column1, timestamp=1522249109960, value=another value1                                     
 row2                                column=family2:, timestamp=1522249130804, value=foobar1                                                   
 row2                                column=family2:column2, timestamp=1522249130804, value=another value1                                     
2 row(s)
Took 0.0051 seconds                                                                                                                            
hbase(main):028:0>
{code}


was (Author: nihaljain.cs):
Based on [ruby documentation|http://ruby-doc.org/core-2.2.2/Hash.html]
{quote}Hashes enumerate their values in the order that the corresponding keys were inserted.
{quote}
So, the key which is inserted first would overwrite the previous one.

 

> Put in hbase shell cannot do multiple columns
> ---------------------------------------------
>
>                 Key: HBASE-18999
>                 URL: https://issues.apache.org/jira/browse/HBASE-18999
>             Project: HBase
>          Issue Type: Improvement
>          Components: shell
>    Affects Versions: 1.0.0, 2.0.0
>            Reporter: Mike Drob
>            Assignee: Nihal Jain
>            Priority: Major
>
> A {{Put}} can carry multiple cells, but doing so in the shell is very difficult to construct. We should make this easier.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)