Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # dev >> Issues with close_region


Copy link to this message
-
Re: Issues with close_region
Hi Stack,

On Jun 17, 2011, at 5:43 PM, Stack wrote:

> On Thu, Jun 16, 2011 at 11:49 PM, Lars George <[EMAIL PROTECTED]> 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.

Yes please.

> 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

Well, with the last I am not sure of the implications, but what we discussed is that you should be able to close a region even if it is not in META, right? So trunk seems to be doing that, while 0.90 branch does not. I was wondering if that is worth backporting? Rare event though that this is needed and a RS restart also removes the region, so I would leave this as a nice to have thing, but would not spent resources on it.

Lars
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB