public class DistributedHBaseCluster
extends HBaseCluster
| Constructor and Description |
|---|
DistributedHBaseCluster(Configuration conf,
org.apache.hadoop.hbase.ClusterManager clusterManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
AdminProtos.AdminService.BlockingInterface |
getAdminProtocol(ServerName serverName) |
ClientProtos.ClientService.BlockingInterface |
getClientProtocol(ServerName serverName) |
org.apache.hadoop.hbase.ClusterManager |
getClusterManager() |
ClusterMetrics |
getClusterMetrics()
Returns a ClusterStatus for this HBase cluster
|
ClusterMetrics |
getInitialClusterMetrics() |
MasterService.BlockingInterface |
getMasterAdminService() |
ServerName |
getServerHoldingRegion(TableName tn,
byte[] regionName) |
boolean |
isDistributedCluster() |
boolean |
isKilledRS(ServerName serverName) |
void |
killDataNode(ServerName serverName) |
void |
killMaster(ServerName serverName) |
void |
killRegionServer(ServerName serverName) |
void |
killZkNode(ServerName serverName) |
protected boolean |
restoreAdmin() |
boolean |
restoreClusterMetrics(ClusterMetrics initial) |
protected boolean |
restoreMasters(ClusterMetrics initial,
ClusterMetrics current) |
protected boolean |
restoreRegionServers(ClusterMetrics initial,
ClusterMetrics current) |
void |
setClusterManager(org.apache.hadoop.hbase.ClusterManager clusterManager) |
void |
shutdown() |
void |
startDataNode(ServerName serverName) |
void |
startMaster(java.lang.String hostname,
int port) |
void |
startRegionServer(java.lang.String hostname,
int port) |
void |
startZkNode(java.lang.String hostname,
int port) |
void |
stopDataNode(ServerName serverName) |
void |
stopMaster(ServerName serverName) |
void |
stopRegionServer(ServerName serverName) |
void |
stopZkNode(ServerName serverName) |
boolean |
waitForActiveAndReadyMaster(long timeout) |
void |
waitForDataNodeToStart(ServerName serverName,
long timeout) |
void |
waitForDataNodeToStop(ServerName serverName,
long timeout) |
void |
waitForMasterToStop(ServerName serverName,
long timeout) |
void |
waitForRegionServerToStop(ServerName serverName,
long timeout) |
void |
waitForZkNodeToStart(ServerName serverName,
long timeout) |
void |
waitForZkNodeToStop(ServerName serverName,
long timeout) |
void |
waitUntilShutDown() |
public DistributedHBaseCluster(Configuration conf,
org.apache.hadoop.hbase.ClusterManager clusterManager)
throws java.io.IOException
java.io.IOExceptionpublic void setClusterManager(org.apache.hadoop.hbase.ClusterManager clusterManager)
public org.apache.hadoop.hbase.ClusterManager getClusterManager()
public ClusterMetrics getClusterMetrics()
throws java.io.IOException
java.io.IOExceptionpublic ClusterMetrics getInitialClusterMetrics()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic AdminProtos.AdminService.BlockingInterface getAdminProtocol(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic ClientProtos.ClientService.BlockingInterface getClientProtocol(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic void startRegionServer(java.lang.String hostname,
int port)
throws java.io.IOException
java.io.IOExceptionpublic void killRegionServer(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic boolean isKilledRS(ServerName serverName)
public void stopRegionServer(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic void waitForRegionServerToStop(ServerName serverName,
long timeout)
throws java.io.IOException
java.io.IOExceptionpublic void startZkNode(java.lang.String hostname,
int port)
throws java.io.IOException
java.io.IOExceptionpublic void killZkNode(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic void stopZkNode(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic void waitForZkNodeToStart(ServerName serverName,
long timeout)
throws java.io.IOException
java.io.IOExceptionpublic void waitForZkNodeToStop(ServerName serverName,
long timeout)
throws java.io.IOException
java.io.IOExceptionpublic void startDataNode(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic void killDataNode(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic void stopDataNode(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic void waitForDataNodeToStart(ServerName serverName,
long timeout)
throws java.io.IOException
java.io.IOExceptionpublic void waitForDataNodeToStop(ServerName serverName,
long timeout)
throws java.io.IOException
java.io.IOExceptionpublic MasterService.BlockingInterface getMasterAdminService()
throws java.io.IOException
java.io.IOExceptionpublic void startMaster(java.lang.String hostname,
int port)
throws java.io.IOException
java.io.IOExceptionpublic void killMaster(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic void stopMaster(ServerName serverName)
throws java.io.IOException
java.io.IOExceptionpublic void waitForMasterToStop(ServerName serverName,
long timeout)
throws java.io.IOException
java.io.IOExceptionpublic boolean waitForActiveAndReadyMaster(long timeout)
throws java.io.IOException
java.io.IOExceptionpublic ServerName getServerHoldingRegion(TableName tn,
byte[] regionName)
throws java.io.IOException
java.io.IOExceptionpublic void waitUntilShutDown()
public void shutdown()
throws java.io.IOException
java.io.IOExceptionpublic boolean isDistributedCluster()
public boolean restoreClusterMetrics(ClusterMetrics initial)
throws java.io.IOException
java.io.IOExceptionprotected boolean restoreMasters(ClusterMetrics initial,
ClusterMetrics current)
protected boolean restoreRegionServers(ClusterMetrics initial,
ClusterMetrics current)
protected boolean restoreAdmin()
throws java.io.IOException
java.io.IOException