[ https://issues.apache.org/jira/browse/HBASE-6331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406934#comment-13406934 ]
ramkrishna.s.vasudevan edited comment on HBASE-6331 at 7/5/12 9:33 AM: ----------------------------------------------------------------------- This issue we observed after doing -fixSplitParents..followed by hbck -fix and hbck -repair. I think we may need documentation here on the usage of fixSplitParents. Parent region A got split into A1 and A2. A -> startkey = 'x' and endkey = ''. So A1 -> startkey = 'x' and endkey = 'x1' A2 -> startkey = 'x1' and endkey =''. Here while reading the hdfs hbck finds there are 2 regions with same start key and 1 region that overlaps. {code} ERROR: (region ufdr,010193811093051,1341438516341.cd3d13f6574059498ceded9661e136cd.) Multiple regions have the same startkey: 010193811093051 ERROR: (region ufdr,010193811093051,1341438202996.e3af982dffd49d785f76ab6e5aa36fc0.) Multiple regions have the same startkey: 010193811093051 ERROR: (regions ufdr,010193811093051,1341438202996.e3af982dffd49d785f76ab6e5aa36fc0. and ufdr,010196915311117,1341438516341.865326e49dfa71996a92dfa5e45c6977.) There is an overlap in the region chain. {code} {code} 12/07/05 11:14:09 DEBUG util.HBaseFsck: HRegionInfo read: {NAME => 'ufdr,010193811093051,1341438516341.cd3d13f6574059498ceded9661e136cd.', STARTKEY => '010193811093051', ENDKEY => '010196915311117', ENCODED => cd3d13f6574059498ceded9661e136cd,} 12/07/05 11:14:09 DEBUG util.HBaseFsck: HRegionInfo read: {NAME => 'ufdr,010193811093051,1341438202996.e3af982dffd49d785f76ab6e5aa36fc0.', STARTKEY => '010193811093051', ENDKEY => '', ENCODED => e3af982dffd49d785f76ab6e5aa36fc0,} 12/07/05 11:14:09 DEBUG util.HBaseFsck: HRegionInfo read: {NAME => 'ufdr,010196915311117,1341438516341.865326e49dfa71996a92dfa5e45c6977.', STARTKEY => '010196915311117', ENDKEY => '', ENCODED => 865326e49dfa71996a92dfa5e45c6977,} {code} Now finally while fixing this HBCK creates a region which does not have empty start key. We can try fixing HBASE-6223 so that we are clear on the usage of -fixSplitParents. was (Author: ram_krish): This issue we observed after doing -fixSplitParents..followed by hbck -fix and hbck -repair. I think we may need documentation here on the usage of fixSplitParents. Parent region A got split into A1 and A2. A -> startkey = 'x' and endkey = ''. So A1 -> startkey = 'x' and endkey = 'x1' A2 -> startkey = 'x1' and endkey =''. Here while reading the hdfs hbck finds there are 2 regions with same start key and 1 region that overlaps. {code} ERROR: (region ufdr,010193811093051,1341438516341.cd3d13f6574059498ceded9661e136cd.) Multiple regions have the same startkey: 010193811093051 ERROR: (region ufdr,010193811093051,1341438202996.e3af982dffd49d785f76ab6e5aa36fc0.) Multiple regions have the same startkey: 010193811093051 ERROR: (regions ufdr,010193811093051,1341438202996.e3af982dffd49d785f76ab6e5aa36fc0. and ufdr,010196915311117,1341438516341.865326e49dfa71996a92dfa5e45c6977.) There is an overlap in the region chain. {code} 12/07/05 11:14:09 DEBUG util.HBaseFsck: HRegionInfo read: {NAME => 'ufdr,010193811093051,1341438516341.cd3d13f6574059498ceded9661e136cd.', STARTKEY => '010193811093051', ENDKEY => '010196915311117', ENCODED => cd3d13f6574059498ceded9661e136cd,} 12/07/05 11:14:09 DEBUG util.HBaseFsck: HRegionInfo read: {NAME => 'ufdr,010193811093051,1341438202996.e3af982dffd49d785f76ab6e5aa36fc0.', STARTKEY => '010193811093051', ENDKEY => '', ENCODED => e3af982dffd49d785f76ab6e5aa36fc0,} 12/07/05 11:14:09 DEBUG util.HBaseFsck: HRegionInfo read: {NAME => 'ufdr,010196915311117,1341438516341.865326e49dfa71996a92dfa5e45c6977.', STARTKEY => '010196915311117', ENDKEY => '', ENCODED => 865326e49dfa71996a92dfa5e45c6977,} {code} Now finally while fixing this HBCK creates a region which does not have empty start key. We can try fixing HBASE-6223 so that we are clear on the usage of -fixSplitParents. > Problem with HBCK mergeOverlaps > ------------------------------- > > Key: HBASE-6331 > URL: https://issues.apache.org/jira/browse/HBASE-6331 > Project: HBase > Issue Type: Bug > Components: hbck > Reporter: Anoop Sam John > Assignee: Anoop Sam John > Fix For: 0.96.0, 0.94.1 > > Attachments: HBASE-6331_94.patch, HBASE-6331_Trunk.patch > > > In HDFSIntegrityFixer#mergeOverlaps(), there is a logic to create the final > range of the region after the overlap. > I can see one issue with this code > {code} > if (RegionSplitCalculator.BYTES_COMPARATOR > .compare(hi.getEndKey(), range.getSecond()) > 0) { > range.setSecond(hi.getEndKey()); > } > {code} > Here suppose the regions include the end region for which the endKey will be > empty, we need to get finally the range with endkey as empty byte[] > But as per the above logic it will see that any other key greater than the > empty byte[] and will set it. > Finally the new region created will not get endkey as empty byte[] -- 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