public class Action extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Action.ActionContext
Context for Action's
|
Modifier and Type | Field and Description |
---|---|
protected HBaseCluster |
cluster |
protected Action.ActionContext |
context |
protected ServerName[] |
initialServers |
protected ClusterStatus |
initialStatus |
protected static long |
KILL_MASTER_TIMEOUT_DEFAULT |
static String |
KILL_MASTER_TIMEOUT_KEY |
protected static long |
KILL_RS_TIMEOUT_DEFAULT |
static String |
KILL_RS_TIMEOUT_KEY |
protected long |
killMasterTimeout |
protected long |
killRsTimeout |
protected static Log |
LOG |
protected static long |
START_MASTER_TIMEOUT_DEFAULT |
static String |
START_MASTER_TIMEOUT_KEY |
protected static long |
START_RS_TIMEOUT_DEFAULT |
static String |
START_RS_TIMEOUT_KEY |
protected long |
startMasterTimeout |
protected long |
startRsTimeout |
Constructor and Description |
---|
Action() |
Modifier and Type | Method and Description |
---|---|
protected void |
forceBalancer() |
protected ServerName[] |
getCurrentServers()
Returns current region servers - active master
|
void |
init(Action.ActionContext context) |
protected void |
killMaster(ServerName server) |
protected void |
killRs(ServerName server) |
void |
perform() |
protected void |
startMaster(ServerName server) |
protected void |
startRs(ServerName server) |
protected void |
unbalanceRegions(ClusterStatus clusterStatus,
List<ServerName> fromServers,
List<ServerName> toServers,
double fractionOfRegions) |
public static final String KILL_MASTER_TIMEOUT_KEY
public static final String START_MASTER_TIMEOUT_KEY
public static final String KILL_RS_TIMEOUT_KEY
public static final String START_RS_TIMEOUT_KEY
protected static Log LOG
protected static final long KILL_MASTER_TIMEOUT_DEFAULT
protected static final long START_MASTER_TIMEOUT_DEFAULT
protected static final long KILL_RS_TIMEOUT_DEFAULT
protected static final long START_RS_TIMEOUT_DEFAULT
protected Action.ActionContext context
protected HBaseCluster cluster
protected ClusterStatus initialStatus
protected ServerName[] initialServers
protected long killMasterTimeout
protected long startMasterTimeout
protected long killRsTimeout
protected long startRsTimeout
public void init(Action.ActionContext context) throws IOException
IOException
protected ServerName[] getCurrentServers() throws IOException
IOException
protected void killMaster(ServerName server) throws IOException
IOException
protected void startMaster(ServerName server) throws IOException
IOException
protected void killRs(ServerName server) throws IOException
IOException
protected void startRs(ServerName server) throws IOException
IOException
protected void unbalanceRegions(ClusterStatus clusterStatus, List<ServerName> fromServers, List<ServerName> toServers, double fractionOfRegions) throws Exception
Exception