[
https://issues.apache.org/jira/browse/HBASE-10003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13911288#comment-13911288
]
takeshi.miao commented on HBASE-10003:
--------------------------------------
Hi All,
After some code studies, I have some questions needed to come out for your
opinions...
1. The logic of merging two regions is self-contained and clear in the
_[o.a.h.hbase.master.handler.DispatchMergineRegionHandler#process()|https://github.com/apache/hbase/blob/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DispatchMergingRegionHandler.java#L73]_.
So I am considering to write two more handlers to deal with '-max' and
'-regioncount' options. They would extend from the
_DispatchMergingRegionHandler_ class (with minimal revised for easy to extend).
2. Due to #1, so there will be a new question is... Where would these three
type of Handlers be selected ? Currently, I am considering to do the selection
in the code
_[o.a.h.hbase.master.HMaster#dispatchMergingRegions|https://github.com/apache/hbase/blob/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java#L1658]_
3. And I am also considering about the spec. of ruby shell command, according
to the descriptions and comments previously. I think the spec would become...
{code:title=old spec}
merge_region 'ENCODED_REGIONNAME', 'ENCODED_REGIONNAME' [, forcible]
{code}
{code:title=new spec}
merge_region [-max | -regioncount <num>] | 'ENCODED_REGIONNAME',
'ENCODED_REGIONNAME' [, forcible]
{code}
Is this a reasonable spec for this requirement ? especially the forcible for me
is dangerous for batch mode, so I still put it with the only two regions
merging version.
4. according to the spec defined in the #3, I could not found the similar case
in current ruby shell impl., so I am wandering this kind of spec whether could
be supported by the both current ruby and protobuf impl. ? I am still not
familiar with the ruby & protobuf, so there may be an answer already somewhere
I did not noticed...
Sorry these maybe too many questions here, due to I need to get some more info.
and direction from you guys to help me impl. it more smoothly, tks a lot~
> OnlineMerge should be extended to allow bulk merging
> ----------------------------------------------------
>
> Key: HBASE-10003
> URL: https://issues.apache.org/jira/browse/HBASE-10003
> Project: HBase
> Issue Type: Improvement
> Components: Admin, Usability
> Affects Versions: 0.98.0, 0.94.6
> Reporter: Clint Heath
> Priority: Critical
> Labels: noob
>
> Now that we have Online Merge capabilities, the function of that tool should
> be extended to make it much easier for HBase operations folks to use.
> Currently it is a very manual process (one fraught with confusion) to hand
> pick two regions that are contiguous to each other in the META table such
> that the admin can manually request those two regions to be merged.
> In the real world, when admins find themselves wanting to merge regions, it's
> usually because they've greatly increased their hbase.hregion.max.filesize
> property and they have way too many regions on a table and want to reduce the
> region count for that entire table quickly and easily.
> Why can't the OnlineMerge command just take a "-max" argument along with a
> table name which tells it to go ahead and merge all regions of said table
> until the resulting regions are all of max size? This takes the voodoo out
> of the process and quickly gets the admin what they're looking for.
> As part of this improvement, I also suggest a "-regioncount" argument for
> OnlineMerge, which will attempt to reduce the table's region count down to
> the specified #.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)