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

Yi Liang edited comment on HBASE-16381 at 9/9/16 5:35 PM:
----------------------------------------------------------

yes, agree with Jerry. You can see from below code, the delete also use 
deleteall's implementation, there maybe some reason why two similar delete 
commands could co-exist.  
{code}
    # Delete a cell
    def _delete_internal(row, column,
                        timestamp = 
org.apache.hadoop.hbase.HConstants::LATEST_TIMESTAMP, args = {})
      _deleteall_internal(row, column, timestamp, args)
    end
{code}

I provide a patch that extend deleteall to support row prefix.
the usage is also below, 
{code}
  hbase> deleteall 't1', {ROWPREFIXFILTER => 'prefix'}
  hbase> deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, 'c1'        //delete 
certain cf in the row ranges
  hbase> deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, 'c1', ts1
  hbase> deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, 'c1', ts1, 
{VISIBILITY=>'PRIVATE|SECRET'}
{code}


was (Author: easyliangjob):
yes, agree with Jerry. You can see from below code, the delete also use 
deleteall's implementation, there maybe some reason why two similar delete 
commands could exist.  
{code}
    # Delete a cell
    def _delete_internal(row, column,
                        timestamp = 
org.apache.hadoop.hbase.HConstants::LATEST_TIMESTAMP, args = {})
      _deleteall_internal(row, column, timestamp, args)
    end
{code}

I provide a patch that extend deleteall to support row prefix.
the usage is also below, 
{code}
  hbase> deleteall 't1', {ROWPREFIXFILTER => 'prefix'}
  hbase> deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, 'c1'        //delete 
certain cf in the row ranges
  hbase> deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, 'c1', ts1
  hbase> deleteall 't1', {ROWPREFIXFILTER => 'prefix'}, 'c1', ts1, 
{VISIBILITY=>'PRIVATE|SECRET'}
{code}

> Shell deleteall command should support row key prefixes
> -------------------------------------------------------
>
>                 Key: HBASE-16381
>                 URL: https://issues.apache.org/jira/browse/HBASE-16381
>             Project: HBase
>          Issue Type: Improvement
>          Components: shell
>            Reporter: Andrew Purtell
>            Assignee: Yi Liang
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: HBASE-16381-V1.patch, HBASE-16381-V2.patch, 
> HBASE-16381-V3.patch
>
>
> The shell's deleteall command should support deleting a row range using a row 
> key prefix. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to