public abstract class Action extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Action.ActionContext
Context for Action's
|
Constructor and Description |
---|
Action() |
Modifier and Type | Method and Description |
---|---|
protected void |
forceBalancer() |
org.apache.hadoop.conf.Configuration |
getConf() |
protected org.apache.hadoop.hbase.ServerName[] |
getCurrentServers()
Returns current region servers - active master
|
protected abstract org.slf4j.Logger |
getLogger()
Retrieve the instance's
Logger , for use throughout the class hierarchy. |
void |
init(Action.ActionContext context) |
protected void |
killDataNode(org.apache.hadoop.hbase.ServerName server) |
protected void |
killMaster(org.apache.hadoop.hbase.ServerName server) |
protected void |
killNameNode(org.apache.hadoop.hbase.ServerName server) |
protected void |
killRs(org.apache.hadoop.hbase.ServerName server) |
protected void |
killZKNode(org.apache.hadoop.hbase.ServerName server) |
protected void |
modifyAllTableColumns(org.apache.hadoop.hbase.TableName tableName,
BiConsumer<String,org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder> transform)
Apply a transform to all columns in a given table.
|
protected void |
modifyAllTableColumns(org.apache.hadoop.hbase.TableName tableName,
Consumer<org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder> transform)
Apply a transform to all columns in a given table.
|
void |
perform() |
protected void |
resumeRs(org.apache.hadoop.hbase.ServerName server) |
protected void |
setBalancer(boolean onOrOff,
boolean synchronous) |
protected void |
startDataNode(org.apache.hadoop.hbase.ServerName server) |
protected void |
startMaster(org.apache.hadoop.hbase.ServerName server) |
protected void |
startNameNode(org.apache.hadoop.hbase.ServerName server) |
protected void |
startRs(org.apache.hadoop.hbase.ServerName server) |
protected void |
startZKNode(org.apache.hadoop.hbase.ServerName server) |
protected void |
stopRs(org.apache.hadoop.hbase.ServerName server) |
protected void |
suspendRs(org.apache.hadoop.hbase.ServerName server) |
protected void |
unbalanceRegions(org.apache.hadoop.hbase.ClusterMetrics clusterStatus,
List<org.apache.hadoop.hbase.ServerName> fromServers,
List<org.apache.hadoop.hbase.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
public static final String KILL_ZK_NODE_TIMEOUT_KEY
public static final String START_ZK_NODE_TIMEOUT_KEY
public static final String KILL_DATANODE_TIMEOUT_KEY
public static final String START_DATANODE_TIMEOUT_KEY
public static final String KILL_NAMENODE_TIMEOUT_KEY
public static final String START_NAMENODE_TIMEOUT_KEY
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 static final long KILL_ZK_NODE_TIMEOUT_DEFAULT
protected static final long START_ZK_NODE_TIMEOUT_DEFAULT
protected static final long KILL_DATANODE_TIMEOUT_DEFAULT
protected static final long START_DATANODE_TIMEOUT_DEFAULT
protected static final long KILL_NAMENODE_TIMEOUT_DEFAULT
protected static final long START_NAMENODE_TIMEOUT_DEFAULT
protected Action.ActionContext context
protected HBaseCluster cluster
protected org.apache.hadoop.hbase.ClusterMetrics initialStatus
protected org.apache.hadoop.hbase.ServerName[] initialServers
protected Properties monkeyProps
protected long killMasterTimeout
protected long startMasterTimeout
protected long killRsTimeout
protected long startRsTimeout
protected long killZkNodeTimeout
protected long startZkNodeTimeout
protected long killDataNodeTimeout
protected long startDataNodeTimeout
protected long killNameNodeTimeout
protected long startNameNodeTimeout
protected boolean skipMetaRS
public Action()
protected abstract org.slf4j.Logger getLogger()
Logger
, for use throughout the class hierarchy.public void init(Action.ActionContext context) throws IOException
IOException
protected org.apache.hadoop.hbase.ServerName[] getCurrentServers() throws IOException
IOException
protected void killMaster(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void startMaster(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void stopRs(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void suspendRs(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void resumeRs(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void killRs(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void startRs(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void killZKNode(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void startZKNode(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void killDataNode(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void startDataNode(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void killNameNode(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void startNameNode(org.apache.hadoop.hbase.ServerName server) throws IOException
IOException
protected void unbalanceRegions(org.apache.hadoop.hbase.ClusterMetrics clusterStatus, List<org.apache.hadoop.hbase.ServerName> fromServers, List<org.apache.hadoop.hbase.ServerName> toServers, double fractionOfRegions) throws Exception
Exception
protected void forceBalancer() throws Exception
Exception
protected void setBalancer(boolean onOrOff, boolean synchronous) throws Exception
Exception
public org.apache.hadoop.conf.Configuration getConf()
protected void modifyAllTableColumns(org.apache.hadoop.hbase.TableName tableName, BiConsumer<String,org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder> transform) throws IOException
tableName
- the table to modifytransform
- the modification to perform. Callers will have the column name as a string and
a column family builder available to themIOException
protected void modifyAllTableColumns(org.apache.hadoop.hbase.TableName tableName, Consumer<org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder> transform) throws IOException
tableName
- the table to modifytransform
- the modification to perform on each column family descriptor builderIOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.