[
https://issues.apache.org/jira/browse/HBASE-22843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16906437#comment-16906437
]
Sakthi commented on HBASE-22843:
--------------------------------
Sure, [~stack] let me create a new one.
For #2, I was thinking of pulling the code local from HBaseFsck as of now like
this:
{code:java}
-PairOfSameType<RegionInfo> mergeRegions =
MetaTableAccessor.getMergeRegions(result);
-for (RegionInfo mergeRegion : new RegionInfo[] {
-mergeRegions.getFirst(), mergeRegions.getSecond() }) {
-if (mergeRegion != null) {
-// This region is already been merged
-HbckRegionInfo hbInfo = getOrCreateInfo(mergeRegion.getEncodedName());
-hbInfo.setMerged(true);
-}
+List<RegionInfo> mergeParents =
MetaTableAccessor.getMergeRegions(result.rawCells());
+if (mergeParents != null) {
+for (RegionInfo mergeRegion : mergeParents) {
+ if (mergeRegion != null) {
+// This region is already being merged
+ HbckRegionInfo hbInfo = getOrCreateInfo(mergeRegion.getEncodedName());
+ hbInfo.setMerged(true);
+ }
}{code}
Our hbck2 doesn't support multi-region merge yet, right (?). In that case, let
me look at enabling multi-region merge from hbck2 parallely to see what else
comes out.
Thanks for your comments Stack.
> [HBCK2] Fix HBCK2 after HBASE-22777 & HBASE-22758
> -------------------------------------------------
>
> Key: HBASE-22843
> URL: https://issues.apache.org/jira/browse/HBASE-22843
> Project: HBase
> Issue Type: Sub-task
> Components: hbase-operator-tools
> Reporter: Sakthi
> Assignee: Sakthi
> Priority: Blocker
>
> There were few changes made in HBASE-22777 & HBASE-22758, which would require
> their propogation to HBCK2 as well to prevent compilation issues. These are
> the ones:
> 1. MetaTableAccessor#makePutFromTableState was changed from public to
> private. HBCK2 uses it in HBaseFsck#generatePuts() for rebuildMeta(). We
> either need to revert the change to public or make similar adjustments in
> HBCK2.
> 2.
> {code:java}
> -PairOfSameType<RegionInfo> getMergeRegions(Result data)
> +List<RegionInfo> getMergeRegions(Cell[] cells){code}
> Due to this change, HBaseFsck was fixed accordingly but not HBCK2. Let's do
> it there as well.
> 3. MetaTableAccessor#deleteRegion() was renamed to
> MetaTableAccessor#deleteRegionInfo(). Even this should be integrated with
> HBCK2.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)