Here is how the scripts work:
Run excise_regions.rb as follows:
./bin/hbase org.jruby.Main bin/excise_regions.rb TestTable 0000107136 0104707253 archive
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:
./bin/hbase org.jruby.Main bin/plug_hole.rb TestTable 0000107136 0104707253
This adds a region that spans the passed keys.