diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestBaseLoadBalancer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestBaseLoadBalancer.java index bed132190a5..7fd52ab9faf 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestBaseLoadBalancer.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestBaseLoadBalancer.java @@ -48,7 +48,6 @@ import org.apache.hadoop.hbase.master.RegionPlan; import org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster; import org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.MoveRegionAction; import org.apache.hadoop.net.DNSToSwitchMapping; -import org.apache.hadoop.net.ScriptBasedMapping; import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -74,12 +73,12 @@ public class TestBaseLoadBalancer extends BalancerTestBase { new int[] { 2, 10 }, new int[] { 2, 100 }, new int[] { 12, 10 }, new int[] { 12, 100 }, }; // This class is introduced because IP to rack resolution can be lengthy. - public static class MockMapping extends ScriptBasedMapping { + public static class MockMapping implements DNSToSwitchMapping { public MockMapping(Configuration conf) { } private static String RACK = "rack"; - @Override + public List resolve(List names) { List ret = new ArrayList(names.size()); for (String name : names) { @@ -87,6 +86,14 @@ public class TestBaseLoadBalancer extends BalancerTestBase { } return ret; } + + // do not add @Override annotations here. It mighty break compilation with earlier Hadoops + public void reloadCachedMappings() { + } + + // do not add @Override annotations here. It mighty break compilation with earlier Hadoops + public void reloadCachedMappings(List arg0) { + } } @BeforeClass