HBASE-7760 tiny issue in ChaosMonkey - kills meta server instead of root
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1442403 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6430721b83
commit
b9b6c9293f
|
@ -30,6 +30,7 @@ import org.apache.hadoop.hbase.client.HConnection;
|
|||
import org.apache.hadoop.hbase.client.HConnectionManager;
|
||||
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
|
||||
import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.hbase.util.Threads;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
@ -186,6 +187,9 @@ public class DistributedHBaseCluster extends HBaseCluster {
|
|||
HConnection connection = admin.getConnection();
|
||||
HRegionLocation regionLoc = connection.locateRegion(regionName);
|
||||
if (regionLoc == null) {
|
||||
LOG.warn("Cannot find region server holding region " + Bytes.toString(regionName)
|
||||
+ " for table " + HRegionInfo.getTableName(regionName) + ", start key [" +
|
||||
Bytes.toString(HRegionInfo.getStartKey(regionName)) + "]");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ public class ChaosMonkey extends AbstractHBaseTool implements Stoppable {
|
|||
@Override
|
||||
protected void perform() throws Exception {
|
||||
LOG.info("Performing action: Restart region server holding ROOT");
|
||||
ServerName server = cluster.getServerHoldingMeta();
|
||||
ServerName server = cluster.getServerHoldingRoot();
|
||||
if (server == null) {
|
||||
LOG.warn("No server is holding -ROOT- right now.");
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue