HBASE-3070 Add to hbaseadmin means of shutting down a regionserver
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1003702 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dd39498ce4
commit
3161a555e1
|
@ -965,6 +965,7 @@ Release 0.21.0 - Unreleased
|
|||
HBASE-3066 We don't put the port for hregionserver up into znode since
|
||||
new master
|
||||
HBASE-2825 Scans respect row locks
|
||||
HBASE-3070 Add to hbaseadmin means of shutting down a regionserver
|
||||
|
||||
NEW FEATURES
|
||||
HBASE-1961 HBase EC2 scripts
|
||||
|
|
|
@ -1006,6 +1006,16 @@ public class HBaseAdmin implements Abortable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the designated regionserver.
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
*/
|
||||
public synchronized void stopRegionServer(final HServerAddress hsa)
|
||||
throws IOException {
|
||||
HRegionInterface rs = this.connection.getHRegionConnection(hsa);
|
||||
rs.stop("Called by admin client " + this.connection.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return cluster status
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
|
|
|
@ -64,7 +64,6 @@ import org.apache.hadoop.hbase.util.SoftValueSortedMap;
|
|||
import org.apache.hadoop.hbase.util.Writables;
|
||||
import org.apache.hadoop.hbase.zookeeper.RootRegionTracker;
|
||||
import org.apache.hadoop.hbase.zookeeper.ZKTableDisable;
|
||||
import org.apache.hadoop.hbase.zookeeper.ZKUtil;
|
||||
import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
|
||||
import org.apache.hadoop.ipc.RemoteException;
|
||||
import org.apache.zookeeper.KeeperException;
|
||||
|
@ -271,6 +270,12 @@ public class HConnectionManager {
|
|||
this.masterChecked = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// Return our zk identifier ... it 'hconnection + zk sessionid'.
|
||||
return this.zooKeeper.toString();
|
||||
}
|
||||
|
||||
private long getPauseTime(int tries) {
|
||||
int ntries = tries;
|
||||
if (ntries >= HConstants.RETRY_BACKOFF.length) {
|
||||
|
|
Loading…
Reference in New Issue