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/04/21 11:31: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=16446756#comment-16446756 ] 

Nihal Jain edited comment on HBASE-18999 at 4/21/18 11:30 AM:
--------------------------------------------------------------

Hi I added support for multiple column operations for the following shell command:
 * append
 * delete
 * deletall
 * incr
 * put

With this patch, hbase shell will support multi column for all the ops. Correct me if I missed any operation.

The patch seems to introduce a lot of rubocop issues. I am planning to fix them.

It would be great if somebody could review the patch before I put up a follow-up patch.

BTW the following commands are introduced by this patch:
{code:java}
append 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}
append 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}, {ATTRIBUTES => {'mykey'=>'myvalue'}}

delete 't1', 'r1', ['c1', 'c2'], ts1
delete 't1', 'r1', ['c1', 'c2'], ts1, {VISIBILITY => 'PRIVATE|SECRET'}

deleteall 't1', 'r1', ['c1', 'c2']
deleteall 't1', 'r1', ['c1', 'c2'], ts1
deleteall 't1', 'r1', ['c1', 'c2'], ts1, {VISIBILITY=>'PRIVATE|SECRET'}
deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, ['c1', 'c2']
deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, ['c1', 'c2'], ts1
deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, ['c1', 'c2'], ts1, {VISIBILITY=>'PRIVATE|SECRET'}

get_counter 't1', 'r1', ['c1', 'c2']

incr 't1', 'r1', ['c1', 'c2']
incr 't1', 'r1', {'c1' => 1, 'c2' => 1}
incr 't1', 'r1', {'c1' => 10, 'c2' => 20}
incr 't1', 'r1', {'c1' => 10, 'c2' => 20}, {ATTRIBUTES => {'mykey'=>'myvalue'}}
incr 't1', 'r1', ['c1', 'c2'], {ATTRIBUTES => {'mykey' => 'myvalue'}}

put 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}
put 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}, ts1
put 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}, {ATTRIBUTES => {'mykey' => 'myvalue'}}
put 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}, ts1, {ATTRIBUTES => {'mykey' => 'myvalue'}}
{code}
 


was (Author: nihaljain.cs):
Hi I added support for multiple column operations for the following command:
 * append
 * delete
 * deletall
 * incr
 * put

With this patch, hbase will support multi column for all the ops. Correct me if I missed any operation.

The patch seems to introduce a lot of robocop issue. I am planning to fix them.

It would be great if somebody could review the patch before I put up a follow-up patch.

BTW the following commands are introduced by this patch:
{code:java}
append 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}
append 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}, {ATTRIBUTES => {'mykey'=>'myvalue'}}

delete 't1', 'r1', ['c1', 'c2'], ts1
delete 't1', 'r1', ['c1', 'c2'], ts1, {VISIBILITY => 'PRIVATE|SECRET'}

deleteall 't1', 'r1', ['c1', 'c2']
deleteall 't1', 'r1', ['c1', 'c2'], ts1
deleteall 't1', 'r1', ['c1', 'c2'], ts1, {VISIBILITY=>'PRIVATE|SECRET'}
deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, ['c1', 'c2']
deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, ['c1', 'c2'], ts1
deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, ['c1', 'c2'], ts1, {VISIBILITY=>'PRIVATE|SECRET'}

get_counter 't1', 'r1', ['c1', 'c2']

incr 't1', 'r1', ['c1', 'c2']
incr 't1', 'r1', {'c1' => 1, 'c2' => 1}
incr 't1', 'r1', {'c1' => 10, 'c2' => 20}
incr 't1', 'r1', {'c1' => 10, 'c2' => 20}, {ATTRIBUTES => {'mykey'=>'myvalue'}}
incr 't1', 'r1', ['c1', 'c2'], {ATTRIBUTES => {'mykey' => 'myvalue'}}

put 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}
put 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}, ts1
put 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}, {ATTRIBUTES => {'mykey' => 'myvalue'}}
put 't1', 'r1', {'c1' => 'value1', 'c2' => 'value2'}, ts1, {ATTRIBUTES => {'mykey' => 'myvalue'}}
{code}
 

> 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, 3.0.0, 2.0.0
>            Reporter: Mike Drob
>            Assignee: Nihal Jain
>            Priority: Major
>             Fix For: 3.0.0
>
>         Attachments: HBASE-18999.master.001.patch
>
>
> 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)