diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java index 82355c81182..22d0e8e1de5 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java @@ -47,7 +47,6 @@ import org.apache.hadoop.hbase.Waiter; import org.apache.hadoop.hbase.client.replication.ReplicationAdmin; import org.apache.hadoop.hbase.coprocessor.CoreCoprocessor; -import org.apache.hadoop.hbase.coprocessor.HasRegionServerServices; import org.apache.hadoop.hbase.coprocessor.ObserverContext; import org.apache.hadoop.hbase.coprocessor.RegionCoprocessor; import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment; @@ -193,8 +192,7 @@ public class TestReplicaWithCluster { if (!e.getEnvironment().getRegion().getRegionInfo().isMetaRegion() && (replicaId == 0)) { LOG.info("Get, throw Region Server Stopped Exceptoin for region " + e.getEnvironment() .getRegion().getRegionInfo()); - throw new RegionServerStoppedException("Server " + - ((HasRegionServerServices)e.getEnvironment()).getRegionServerServices().getServerName() + throw new RegionServerStoppedException("Server " + e.getEnvironment().getServerName() + " not running"); } } else { @@ -224,8 +222,7 @@ public class TestReplicaWithCluster { LOG.info("Scan, throw Region Server Stopped Exceptoin for replica " + e.getEnvironment() .getRegion().getRegionInfo()); - throw new RegionServerStoppedException("Server " + - ((HasRegionServerServices)e.getEnvironment()).getRegionServerServices().getServerName() + throw new RegionServerStoppedException("Server " + e.getEnvironment().getServerName() + " not running"); } else { LOG.info("Scan, We're replica region " + replicaId);