You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jean-Daniel Cryans (Created) (JIRA)" <ji...@apache.org> on 2012/03/06 01:49:57 UTC

[jira] [Created] (HBASE-5525) Truncate and preserve region boundaries option

Truncate and preserve region boundaries option
----------------------------------------------

                 Key: HBASE-5525
                 URL: https://issues.apache.org/jira/browse/HBASE-5525
             Project: HBase
          Issue Type: New Feature
            Reporter: Jean-Daniel Cryans
             Fix For: 0.96.0


A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "stack (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226649#comment-13226649 ] 

stack commented on HBASE-5525:
------------------------------

Disable table, remove all content from fs under the table's dir, then reenable?
                
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.96.0
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-5525:
-------------------------

    Labels: newbie noob  (was: newbie)
    
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Jean-Daniel Cryans
>              Labels: newbie, noob
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472967#comment-13472967 ] 

Hadoop QA commented on HBASE-5525:
----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12548513/HBASE-5525.patch
  against trunk revision .

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    {color:green}+1 hadoop2.0{color}.  The patch compiles against the hadoop 2.0 profile.

    {color:red}-1 javadoc{color}.  The javadoc tool appears to have generated 81 warning messages.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of javac compiler warnings.

    {color:red}-1 findbugs{color}.  The patch appears to introduce 5 new Findbugs (version 1.3.9) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number of release audit warnings.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.client.TestFromClientSide

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/3025//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3025//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3025//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3025//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3025//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3025//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/3025//console

This message is automatically generated.
                
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.96.0
>            Reporter: Jean-Daniel Cryans
>            Assignee: Kevin Odell
>              Labels: newbie, noob
>             Fix For: 0.96.0
>
>         Attachments: HBASE-5525.patch
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Kevin Odell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Odell updated HBASE-5525:
-------------------------------

    Attachment: HBASE-5525.patch

So I added a new command truncate_preserve, it seemed to fit with the flow of the other commands:

disable_all 
disable_peer

enable_all
enable_peer

alter
alter_async
alter_status

I am not too attached to the name so I am open for suggestions.  I tested this out by altering the ruby code on my box and it worked.  Let me know if you see anything strange.
                
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Jean-Daniel Cryans
>            Assignee: Kevin Odell
>              Labels: newbie, noob
>         Attachments: HBASE-5525.patch
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-5525:
-------------------------

             Tags: noob
    Fix Version/s:     (was: 0.96.0)

Out of 0.96.
                
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Jean-Daniel Cryans
>              Labels: newbie, noob
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Kevin Odell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Odell updated HBASE-5525:
-------------------------------

        Fix Version/s: 0.96.0
    Affects Version/s: 0.96.0
               Status: Patch Available  (was: Open)
    
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.96.0
>            Reporter: Jean-Daniel Cryans
>            Assignee: Kevin Odell
>              Labels: newbie, noob
>             Fix For: 0.96.0
>
>         Attachments: HBASE-5525.patch
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Kevin Odell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Odell reassigned HBASE-5525:
----------------------------------

    Assignee: Kevin Odell
    
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Jean-Daniel Cryans
>            Assignee: Kevin Odell
>              Labels: newbie, noob
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Daniel Cryans updated HBASE-5525:
--------------------------------------

    Labels: newbie  (was: )
    
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Jean-Daniel Cryans
>              Labels: newbie
>             Fix For: 0.96.0
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Gregory Chanan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478248#comment-13478248 ] 

Gregory Chanan commented on HBASE-5525:
---------------------------------------

Looks pretty good.

Maybe truncate_preservebounds instead of truncate_preserve (so it is clear what you are preserving)?  Or make preserve a parameter to truncate, default false?  (the later would be my personal preference).

Also, you could avoid duplicating some code if you had truncate and truncate_preserve call a common function (or just have preserve be a parameter to truncate, as above).
                
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.96.0
>            Reporter: Jean-Daniel Cryans
>            Assignee: Kevin Odell
>              Labels: newbie, noob
>             Fix For: 0.96.0
>
>         Attachments: HBASE-5525.patch
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Ricky Saltzer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478283#comment-13478283 ] 

Ricky Saltzer commented on HBASE-5525:
--------------------------------------

Would it make more sense to have one truncate command, and have an optional parameter which preserves the truncate? Rather than having a separate command for truncating and truncating while preserving region keys? 
                
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.96.0
>            Reporter: Jean-Daniel Cryans
>            Assignee: Kevin Odell
>              Labels: newbie, noob
>             Fix For: 0.96.0
>
>         Attachments: HBASE-5525.patch
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Ricky Saltzer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478289#comment-13478289 ] 

Ricky Saltzer commented on HBASE-5525:
--------------------------------------

+1 Greg, something like would be great, also updating the docs to reflect what 

{noformat}
truncate 'users_table', {PRESERVE => true}
{noformat}
                
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.96.0
>            Reporter: Jean-Daniel Cryans
>            Assignee: Kevin Odell
>              Labels: newbie, noob
>             Fix For: 0.96.0
>
>         Attachments: HBASE-5525.patch
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Kevin Odell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478296#comment-13478296 ] 

Kevin Odell commented on HBASE-5525:
------------------------------------

Great feedback I will work on that as soon as I have time.
                
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.96.0
>            Reporter: Jean-Daniel Cryans
>            Assignee: Kevin Odell
>              Labels: newbie, noob
>             Fix For: 0.96.0
>
>         Attachments: HBASE-5525.patch
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Kevin Odell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Odell updated HBASE-5525:
-------------------------------

    Status: Open  (was: Patch Available)
    
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.96.0
>            Reporter: Jean-Daniel Cryans
>            Assignee: Kevin Odell
>              Labels: newbie, noob
>             Fix For: 0.96.0
>
>         Attachments: HBASE-5525.patch
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-5525) Truncate and preserve region boundaries option

Posted by "Jean-Daniel Cryans (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226651#comment-13226651 ] 

Jean-Daniel Cryans commented on HBASE-5525:
-------------------------------------------

Sounds like a plan, if by "remove all content from fs under the table's dir" you mean under the table's regions' dir.
                
> Truncate and preserve region boundaries option
> ----------------------------------------------
>
>                 Key: HBASE-5525
>                 URL: https://issues.apache.org/jira/browse/HBASE-5525
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.96.0
>
>
> A tool that would be useful for testing (and maybe in prod too) would be a truncate option to keep the current region boundaries. Right now what you have to do is completely kill the table and recreate it with the correct regions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira