From 8d07130c67e0ac5e18608ee0586f547147fb9de8 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Fri, 13 Jan 2012 20:07:40 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 1 + src/main/java/org/apache/hadoop/hbase/HConstants.java | 3 +++ .../org/apache/hadoop/hbase/master/LoadBalancerFactory.java | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 493915d3307..41581f28001 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -477,6 +477,7 @@ Release 0.92.0 - Unreleased it will affect read correctness (Chunhui) 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-5143 Fix config typo in pluggable load balancer factory (Harsh J) TESTS HBASE-4450 test for number of blocks read: to serve as baseline for expected diff --git a/src/main/java/org/apache/hadoop/hbase/HConstants.java b/src/main/java/org/apache/hadoop/hbase/HConstants.java index 904e2d27122..8370ef880c2 100644 --- a/src/main/java/org/apache/hadoop/hbase/HConstants.java +++ b/src/main/java/org/apache/hadoop/hbase/HConstants.java @@ -69,6 +69,9 @@ public final class HConstants { /** Cluster is in distributed mode or not */ 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 */ public static final String CLUSTER_IS_LOCAL = "false"; diff --git a/src/main/java/org/apache/hadoop/hbase/master/LoadBalancerFactory.java b/src/main/java/org/apache/hadoop/hbase/master/LoadBalancerFactory.java index 89685bb46d9..3a22e468dd4 100644 --- a/src/main/java/org/apache/hadoop/hbase/master/LoadBalancerFactory.java +++ b/src/main/java/org/apache/hadoop/hbase/master/LoadBalancerFactory.java @@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.master; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.util.ReflectionUtils; /** @@ -36,7 +37,9 @@ public class LoadBalancerFactory { public static LoadBalancer getLoadBalancer(Configuration conf) { // Create the balancer - Class balancerKlass = conf.getClass("hbase.maser.loadBalancer.class",DefaultLoadBalancer.class, LoadBalancer.class); + Class balancerKlass = conf.getClass( + HConstants.HBASE_MASTER_LOADBALANCER_CLASS, + DefaultLoadBalancer.class, LoadBalancer.class); return ReflectionUtils.newInstance(balancerKlass, conf); }