You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jieshan Bean (JIRA)" <ji...@apache.org> on 2011/07/22 05:21:57 UTC
[jira] [Commented] (HBASE-4122) improve hbck tool to fix .META.
hole issue.
[ https://issues.apache.org/jira/browse/HBASE-4122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069365#comment-13069365 ]
Jieshan Bean commented on HBASE-4122:
-------------------------------------
Two suggestions about the patch:
1. I think change the method name of "HoleFixer" to "holeFixer" is better.
2. About way of traverse the map, I think the following method is a time-consuming:
{noformat}
Iterator it = regionInfo.keySet().iterator();
+ String key = null;
+ HbckInfo value = null;
+ HTableDescriptor talbeDescRight = tempRegioninfo.metaEntry.getTableDesc();
+ byte[] leftEndKey = leftRegionInfo == null ? HConstants.EMPTY_BYTE_ARRAY
+ : leftRegionInfo.metaEntry.getEndKey();
+ byte[] rightStartKey = rightRegionInfo == null ? HConstants.EMPTY_BYTE_ARRAY
+ : rightRegionInfo.metaEntry.getStartKey();
+
+ while (it.hasNext()) {
+ key = (String) it.next();
+ value = regionInfo.get(key);
+ if (value == null
+ || value.regionInfoFromRSOrHDFS == null
+ || talbeDescRight.compareTo(value.regionInfoFromRSOrHDFS
+ .getTableDesc()) != 0) {
+ continue;
+ }
+
+ // true if the region(in RS or in HDFS) that the key range is overlap with
+ // the hole range
+ if (isOverChain(value.regionInfoFromRSOrHDFS, leftEndKey, rightStartKey)) {
+ weaveHoleList.add(value);
+ }
+ }
{noformat}
I think the following method to traverse a map is better:
{noformat}
for(Map.Entry<String, HbckInfo> entry:
regionInfo.entrySet()) {
........
}
{noformat}
> improve hbck tool to fix .META. hole issue.
> -------------------------------------------
>
> Key: HBASE-4122
> URL: https://issues.apache.org/jira/browse/HBASE-4122
> Project: HBase
> Issue Type: Improvement
> Reporter: feng xu
> Fix For: 0.92.0
>
> Attachments: HBASE-4122.patch
>
>
> hbase hbck tool can check the META hole, but it can not fix this problem by --fix.
> I plan to improve the tool.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira