Hi

The purpose of assign() api is to assign a region to an RS as you have
understood correctly.

The purpose of unassign() api is to unassign a region from an RS that was
serving it.
In Hbase while the balancer tries to balance the regions then the overall
purpose is to assign a region R1 served by RS1 to another server RS2.

So as part of this first unassign() will be called to remove the R1 from RS1
and assign will be called to assign R1 to RS2.

Similarly there is a functionality called disabling a table.  It means all
the regions pertaining to a table will be closed.
In that  case also unassign() will be called.

You can also do unassign() manually to unassign or close a region.

Am i clear on this ?

Regards
Ram


-----Original Message-----
From: 吴宗远 [mailto:zongyuan.w...@alibaba-inc.com] 
Sent: Thursday, September 08, 2011 12:37 PM
To: user@hbase.apache.org
Subject: a question about assgin()

Hi all,
I was confused with the difference between “assign()” and “unassign()”
method, because both of them cause the region to be assign to a region.  can
somebody give a clear explanation?
And what is the suitable scenario to use assign() ?

Thanks,
Zongyuan

________________________________
This email (including any attachments) is confidential and may be legally
privileged. If you received this email in error, please delete it
immediately and do not copy it or use it for any purpose or disclose its
contents to any other person. Thank you.

本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您
立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内
容。谢谢。

Reply via email to