You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Jonathan Gray <jg...@apache.org> on 2010/11/06 22:38:34 UTC

Review Request: HBASE-2896: Retain assignment information between cluster shutdown/startup

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1186/
-----------------------------------------------------------

Review request for hbase, stack and khemani.


Summary
-------

Adds a configuration option (default true in this patch) for retaining assignment on startup.  If true, initial assignment plan attempts to use existing assignment info from META (we don't delete assignment info in META when RS closes region).

Also changes initial assignment to skip regions from disabled tables rather than looking at offline flag.


This addresses bug HBASE-2896.
    http://issues.apache.org/jira/browse/HBASE-2896


Diffs
-----

  trunk/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java 1032133 
  trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java 1032133 
  trunk/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java 1032133 
  trunk/src/test/java/org/apache/hadoop/hbase/master/TestLoadBalancer.java 1032133 

Diff: http://review.cloudera.org/r/1186/diff


Testing
-------

I will write a new unit test of the load balancing method to make sure it does what is expected.

I could write a cluster-level TestRetainAssignment test which actually tests it works end to end but I'm not sure it's necessary.  Could also add some modification to TestClusterRestart or whatever that one is.


Thanks,

Jonathan


Re: Review Request: HBASE-2896: Retain assignment information between cluster shutdown/startup

Posted by Jonathan Gray <jg...@apache.org>.

> On 2010-11-06 14:53:12, stack wrote:
> > trunk/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java, line 411
> > <http://review.cloudera.org/r/1186/diff/1/?file=16858#file16858line411>
> >
> >     This is ok for first cut.  Later here we should favor servers who are 'new' or not mentioned in .META..

Agreed.  Just trying to keep it simple for now.  I'm going to write a load balancer unit test before commit, then I'll be more brave at a more optimal algorithm for next time :)


- Jonathan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1186/#review1833
-----------------------------------------------------------


On 2010-11-06 14:38:34, Jonathan Gray wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.cloudera.org/r/1186/
> -----------------------------------------------------------
> 
> (Updated 2010-11-06 14:38:34)
> 
> 
> Review request for hbase, stack and khemani.
> 
> 
> Summary
> -------
> 
> Adds a configuration option (default true in this patch) for retaining assignment on startup.  If true, initial assignment plan attempts to use existing assignment info from META (we don't delete assignment info in META when RS closes region).
> 
> Also changes initial assignment to skip regions from disabled tables rather than looking at offline flag.
> 
> 
> This addresses bug HBASE-2896.
>     http://issues.apache.org/jira/browse/HBASE-2896
> 
> 
> Diffs
> -----
> 
>   trunk/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java 1032133 
>   trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java 1032133 
>   trunk/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java 1032133 
>   trunk/src/test/java/org/apache/hadoop/hbase/master/TestLoadBalancer.java 1032133 
> 
> Diff: http://review.cloudera.org/r/1186/diff
> 
> 
> Testing
> -------
> 
> I will write a new unit test of the load balancing method to make sure it does what is expected.
> 
> I could write a cluster-level TestRetainAssignment test which actually tests it works end to end but I'm not sure it's necessary.  Could also add some modification to TestClusterRestart or whatever that one is.
> 
> 
> Thanks,
> 
> Jonathan
> 
>


Re: Review Request: HBASE-2896: Retain assignment information between cluster shutdown/startup

Posted by st...@duboce.net.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1186/#review1833
-----------------------------------------------------------

Ship it!


Looks great.


trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
<http://review.cloudera.org/r/1186/#comment5933>

    Add to log the type of bulk assign.



trunk/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
<http://review.cloudera.org/r/1186/#comment5934>

    This is ok for first cut.  Later here we should favor servers who are 'new' or not mentioned in .META..


- stack


On 2010-11-06 14:38:34, Jonathan Gray wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.cloudera.org/r/1186/
> -----------------------------------------------------------
> 
> (Updated 2010-11-06 14:38:34)
> 
> 
> Review request for hbase, stack and khemani.
> 
> 
> Summary
> -------
> 
> Adds a configuration option (default true in this patch) for retaining assignment on startup.  If true, initial assignment plan attempts to use existing assignment info from META (we don't delete assignment info in META when RS closes region).
> 
> Also changes initial assignment to skip regions from disabled tables rather than looking at offline flag.
> 
> 
> This addresses bug HBASE-2896.
>     http://issues.apache.org/jira/browse/HBASE-2896
> 
> 
> Diffs
> -----
> 
>   trunk/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java 1032133 
>   trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java 1032133 
>   trunk/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java 1032133 
>   trunk/src/test/java/org/apache/hadoop/hbase/master/TestLoadBalancer.java 1032133 
> 
> Diff: http://review.cloudera.org/r/1186/diff
> 
> 
> Testing
> -------
> 
> I will write a new unit test of the load balancing method to make sure it does what is expected.
> 
> I could write a cluster-level TestRetainAssignment test which actually tests it works end to end but I'm not sure it's necessary.  Could also add some modification to TestClusterRestart or whatever that one is.
> 
> 
> Thanks,
> 
> Jonathan
> 
>


Re: Review Request: HBASE-2896: Retain assignment information between cluster shutdown/startup

Posted by Jonathan Gray <jg...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1186/
-----------------------------------------------------------

(Updated 2010-11-06 15:09:35.731094)


Review request for hbase, stack and khemani.


Changes
-------

Adds unit test of new method in LoadBalancer.  Don't want to get back to olden days of no load balancer tests! :)


Summary
-------

Adds a configuration option (default true in this patch) for retaining assignment on startup.  If true, initial assignment plan attempts to use existing assignment info from META (we don't delete assignment info in META when RS closes region).

Also changes initial assignment to skip regions from disabled tables rather than looking at offline flag.


This addresses bug HBASE-2896.
    http://issues.apache.org/jira/browse/HBASE-2896


Diffs (updated)
-----

  trunk/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java 1032133 
  trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java 1032133 
  trunk/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java 1032133 
  trunk/src/test/java/org/apache/hadoop/hbase/master/TestLoadBalancer.java 1032133 

Diff: http://review.cloudera.org/r/1186/diff


Testing
-------

I will write a new unit test of the load balancing method to make sure it does what is expected.

I could write a cluster-level TestRetainAssignment test which actually tests it works end to end but I'm not sure it's necessary.  Could also add some modification to TestClusterRestart or whatever that one is.


Thanks,

Jonathan