[jira] [Comment Edited] (HBASE-16381) Shell deleteall command should support row key prefixes

2016-09-13 Thread Heng Chen (JIRA)

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

Heng Chen edited comment on HBASE-16381 at 9/14/16 1:29 AM:


{code}
+ if list.size >= 100
+  @table.delete(list)
+  list.clear
+end
{code}

Could we make "100" to be configurable?  In some big table,  "100" maybe too 
small. 


was (Author: chenheng):
{quote}
+ if list.size >= 100
+  @table.delete(list)
+  list.clear
+end
{quote}

Could we make "100" to be configurable?  In some big table,  "100" maybe too 
small. 

> 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, HBASE-16381-V4.patch, HBASE-16381-V5.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)


[jira] [Comment Edited] (HBASE-16381) Shell deleteall command should support row key prefixes

2016-09-09 Thread Yi Liang (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-16381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)