[
https://issues.apache.org/jira/browse/HBASE-4122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093249#comment-13093249
]
stack commented on HBASE-4122:
------------------------------
Here is what the added check_region.rb has different from whats in bin at mo:
{code}
pynchon-590:clean-trunk stack$ diff bin/check_meta.rb /tmp/check_meta.rb
81a82,87
> def add2meta(metatable, hri)
> p = Put.new(hri.getRegionName())
> p.add(HConstants::CATALOG_FAMILY, HConstants::REGIONINFO_QUALIFIER,
> Writables.getBytes(hri))
> metatable.put(p)
> end
>
102,105c108,109
< p = Put.new(hri.getRegionName())
< p.add(HConstants::CATALOG_FAMILY, HConstants::REGIONINFO_QUALIFIER,
Writables.getBytes(hri))
< metatable.put(p)
< LOG.info("Plugged hole in .META. at: " + hri.toString())
---
> add2meta(metatable, hri)
> LOG.info("Plugged hole in .META. at: " + hri.toString() + " with region
> found in fs")
108c112,116
< return plugged
---
> return if plugged
> # No region found in fs.. so just plug the hole
> hri = HRegionInfo.new(leftEdge.getTableDesc(), leftEdge.getEndKey(),
> rightEdge.getStartKey());
> LOG.info("Plugged hole in .META. after: " +
> leftEdge.getRegionNameAsString() + " with " + hri.toString())
> add2meta(metatable, hri)
{code}
> 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.94.0
>
> Attachments: HBASE-4122.patch, check_meta.rb
>
>
> 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