HBASE-5143 Fix config typo in pluggable load balancer factory (Harsh J)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1231281 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2012-01-13 20:07:40 +00:00
parent 240e30c4ab
commit 8d07130c67
3 changed files with 8 additions and 1 deletions

View File

@ -477,6 +477,7 @@ Release 0.92.0 - Unreleased
it will affect read correctness (Chunhui) it will affect read correctness (Chunhui)
HBASE-5137 MasterFileSystem.splitLog() should abort even if waitOnSafeMode() throws IOException(Ted) HBASE-5137 MasterFileSystem.splitLog() should abort even if waitOnSafeMode() throws IOException(Ted)
HBASE-5121 MajorCompaction may affect scan's correctness (chunhui shen and Lars H) HBASE-5121 MajorCompaction may affect scan's correctness (chunhui shen and Lars H)
HBASE-5143 Fix config typo in pluggable load balancer factory (Harsh J)
TESTS TESTS
HBASE-4450 test for number of blocks read: to serve as baseline for expected HBASE-4450 test for number of blocks read: to serve as baseline for expected

View File

@ -69,6 +69,9 @@ public final class HConstants {
/** Cluster is in distributed mode or not */ /** Cluster is in distributed mode or not */
public static final String CLUSTER_DISTRIBUTED = "hbase.cluster.distributed"; public static final String CLUSTER_DISTRIBUTED = "hbase.cluster.distributed";
/** Config for pluggable load balancers */
public static final String HBASE_MASTER_LOADBALANCER_CLASS = "hbase.master.loadbalancer.class";
/** Cluster is standalone or pseudo-distributed */ /** Cluster is standalone or pseudo-distributed */
public static final String CLUSTER_IS_LOCAL = "false"; public static final String CLUSTER_IS_LOCAL = "false";

View File

@ -21,6 +21,7 @@
package org.apache.hadoop.hbase.master; package org.apache.hadoop.hbase.master;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.util.ReflectionUtils;
/** /**
@ -36,7 +37,9 @@ public class LoadBalancerFactory {
public static LoadBalancer getLoadBalancer(Configuration conf) { public static LoadBalancer getLoadBalancer(Configuration conf) {
// Create the balancer // Create the balancer
Class<? extends LoadBalancer> balancerKlass = conf.getClass("hbase.maser.loadBalancer.class",DefaultLoadBalancer.class, LoadBalancer.class); Class<? extends LoadBalancer> balancerKlass = conf.getClass(
HConstants.HBASE_MASTER_LOADBALANCER_CLASS,
DefaultLoadBalancer.class, LoadBalancer.class);
return ReflectionUtils.newInstance(balancerKlass, conf); return ReflectionUtils.newInstance(balancerKlass, conf);
} }