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:
Michael Stack 2013-02-04 22:24:52 +00:00
parent 6430721b83
commit b9b6c9293f
2 changed files with 5 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;