hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: Issues with close_region
Date Fri, 17 Jun 2011 15:43:43 GMT
On Thu, Jun 16, 2011 at 11:49 PM, Lars George <lars.george@gmail.com> wrote:
> The region server is no array of strings, but just one string, so admin.rb
> should be
>
>     # Closes a region
>    def close_region(region_name, server = nil)
>      @admin.closeRegion(region_name, server)
>    end
>
> That fixes the call.

Let me know if you would like me to file issue and commit fix for this.

See below.

> The next issue is, you cannot close a region that is
> not in META, although you are handing in the region name and server address,
> in the 0.90 branch:
>
>      if (hostAndPort != null) {
>        HServerAddress hsa = new HServerAddress(hostAndPort);
>        Pair<HRegionInfo, HServerAddress> pair =
>          MetaReader.getRegion(ct, regionname);
>        if (pair == null || pair.getSecond() == null) {
>          LOG.info("No server in .META. for " +
>            Bytes.toString(regionname) + "; pair=" + pair);
>        } else {
>          closeRegion(hsa, pair.getFirst());
>        }
>      } else {
>
> trunk has:
>
>      if (hostAndPort != null) {
>        Pair<HRegionInfo, ServerName> pair = MetaReader.getRegion(ct,
> regionname);
>        if (pair == null || pair.getSecond() == null) {
>          LOG.info("No server in .META. for " +
>            Bytes.toStringBinary(regionname) + "; pair=" + pair);
>        } else {
>          closeRegion(pair.getSecond(), pair.getFirst());
>        }
>
> so seems to be fixed there, but would not work for a 0.90.x release. Should
> this be backported?
>

Is this broke for trunk and meta?  What if region not found by
MetaReader (not in .meta. but it is out on the RS).

Again, let me know if you want me to file jira and fix these.  This
stuff is needed doing surgery.

St.Ack

Mime
View raw message