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

stack commented on HBASE-2743:
------------------------------

Here is how the scripts work:

Run excise_regions.rb as follows:

{code}
 ./bin/hbase org.jruby.Main bin/excise_regions.rb TestTable 0000107136 
0104707253 archive
{code}

The keys provided must be actual region startkeys that are present in the 
table.  'archive' is the name of the table we archive what we've done into.  It 
must be present for this script to work.  It must have a column family named 
'info'.  Do:

hbase> create 'archive', 'info'

... to create the table.

Run the above multiple times till no more 'Offlined=' and 'Closed and delete=' 
messages.

You may get an NPE from time to time.  Thats OK.  The master is asked to run 
parts of this job and when it goes to execute, the info it needs may not be 
present in .META. (Master needs a patch to not NPE).

When no more messages, then you all regions between the passed key range will 
have been removed from .META. (and closed out on the regionservers).

The regions that were removed from .META. will be listed in the passed archive 
table ('archive' in the cmdline above).

You will now have a hole in your table.

To plug the hole, run the following:

{code}
./bin/hbase org.jruby.Main bin/plug_hole.rb TestTable 0000107136 0104707253
{code}

This adds a region that spans the passed keys.

> Script to drop N regions from a table and then patch hole the hole by 
> inserting a new hole spanning region to meta.
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-2743
>                 URL: https://issues.apache.org/jira/browse/HBASE-2743
>             Project: HBase
>          Issue Type: Task
>            Reporter: stack
>         Attachments: excise_regions.rb, plug_hole.rb
>
>
> Script to help out our mozilla buddies.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to