You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Ramkrishna S Vasudevan <ra...@huawei.com> on 2011/07/05 10:56:33 UTC
Reg : HBASE-4052
Hi All,
I was working on the patch preparation for HBASe-4052.
I have some doubts and like to get some suggestion before proceeding.
Following scenarios needs to be considered.
Scenario 1:
===========
All the regions are disabled and the state in zookeeper is DISABLED.
Scenario:2
==========
The regions are offlined but the AM went down when the zookeeper state was
DISABLING.
Scenario:3
=========
The regions are not yet offlined(or only few regions are offlined) and the
AM went down when the zookeeper state was DISABLING.
Now when we do a switch of the master or on restart scenario of master,
how can we decide which regions were offlined and which are not.
Though we can get the state of the table as either DISABLED or DISABLING,
region wise i am not able to infer in what state the region is.
So what brings me to get this info is
The soln should be like we need to check for the state of the table while
populating the regions map in master startup.
Checking only for DISABLED state:
==========================
Check for disabled state and those regions that are not in the DISABLED
state add it into the regions map in master startup.
If i check only for the DISABLED state and if the table is in DISABLING
state and
after master retry (or switch) if i try to enable then we will not be able
to scan the table because while enabling none of the regions will be enabled
as the regions in META table and the regions that i have populated in the
regions map are same.
So I will be getting the same issue as in the description of the defect.
Checking for DISABLED and DISABLING state:
===================================
if i check the state of the zookeeper for DISABLED and DISABLING and while
restart of master(switch) only those regions which are not in DISABLED or
DISABLING state is populated.
When i again try to enable the region if the region was not offlined as part
of disable flow(Scenario:3), the waitUntilDone in BulkAssigner is not aware
that the region was
already onlined and keeps on waiting as the waitUntilDone() sees for the
number of regions to become online from the regions map and the actual count
it gets from the meta table.
This makes enable to go in a loop.
Am i clear with the problem? so is it like before enabling any table do we
need to check the state of the table and if it is DISABLING make all those
regions to go to
offline mode.
Regards
Ram
****************************************************************************
***********
This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!
Re: Reg : HBASE-4052
Posted by Stack <st...@duboce.net>.
On Tue, Jul 5, 2011 at 1:56 AM, Ramkrishna S Vasudevan
<ra...@huawei.com> wrote:
> I was working on the patch preparation for HBASe-4052.
>
Thank you for doing this.
...
> Am i clear with the problem? so is it like before enabling any table do we
> need to check the state of the table and if it is DISABLING make all those
> regions to go to
>
> offline mode.
>
I think I follow.
Yes, after all regionservers check in and after you scan the .META.
table, IF a table is DISABLING or DISABLED, it might make sense to
send a close to all regionservers that are members of the set of
online servers so for sure you've closed all regions. Or, we need to
keep state somewhere. We used to update the regioninfo in .META.
adding the attribute 'offline'. But I think we only use this when
splitting regions now. Perhaps if a region is disabled, we can mark
it so by clearing its startcode and server from .META.; i.e. an entry
in .META. without a startcode+server is an offline region (We could
not do this in .20.x hbase because we had a meta scanner that would
assign out anything with a bad or empty server).
St.Ack