From 0f5b0fb759f3c191f5a5fa83d61c77ed70c61847 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Wed, 17 Jan 2018 10:56:50 -0800 Subject: [PATCH] HBASE-19815 Flakey TestAssignmentManager.testAssignWithRandExec --- .../hadoop/hbase/master/procedure/RecoverMetaProcedure.java | 6 +++--- .../apache/hadoop/hbase/master/MockNoopMasterServices.java | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RecoverMetaProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RecoverMetaProcedure.java index 6aa7fffaa48..50ef3e0da25 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RecoverMetaProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RecoverMetaProcedure.java @@ -26,7 +26,7 @@ import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.RegionInfo; import org.apache.hadoop.hbase.client.RegionInfoBuilder; import org.apache.hadoop.hbase.client.RegionReplicaUtil; -import org.apache.hadoop.hbase.master.HMaster; +import org.apache.hadoop.hbase.master.MasterServices; import org.apache.hadoop.hbase.master.assignment.AssignProcedure; import org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer; import org.apache.hadoop.hbase.procedure2.ProcedureSuspendedException; @@ -58,7 +58,7 @@ public class RecoverMetaProcedure private int replicaId; private final ProcedurePrepareLatch syncLatch; - private HMaster master; + private MasterServices master; /** * Call this constructor to queue up a {@link RecoverMetaProcedure} in response to meta @@ -250,7 +250,7 @@ public class RecoverMetaProcedure */ private void prepare(MasterProcedureEnv env) { if (master == null) { - master = (HMaster) env.getMasterServices(); + master = env.getMasterServices(); Preconditions.checkArgument(master != null); } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockNoopMasterServices.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockNoopMasterServices.java index 7b6af0e7b6d..be91aa0fdde 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockNoopMasterServices.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockNoopMasterServices.java @@ -26,7 +26,6 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hbase.ChoreService; import org.apache.hadoop.hbase.CoordinatedStateManager; -import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableDescriptors; import org.apache.hadoop.hbase.TableName; @@ -57,7 +56,7 @@ import org.apache.hadoop.hbase.zookeeper.ZKWatcher; import com.google.protobuf.Service; -public class MockNoopMasterServices implements MasterServices, Server { +public class MockNoopMasterServices implements MasterServices { private final Configuration conf; private final MetricsMaster metricsMaster;