Class Action
java.lang.Object
org.apache.hadoop.hbase.chaos.actions.Action
- Direct Known Subclasses:
AddColumnAction
,ChangeBloomFilterAction
,ChangeCompressionAction
,ChangeEncodingAction
,ChangeSplitPolicyAction
,ChangeVersionsAction
,CompactMobAction
,CompactRandomRegionOfTableAction
,CompactTableAction
,CorruptDataFilesAction
,DecreaseMaxHFileSizeAction
,DeleteDataFilesAction
,DumpClusterStatusAction
,DumpHdfsClusterStatusAction
,FlushRandomRegionOfTableAction
,FlushTableAction
,ForceBalancerAction
,MergeRandomAdjacentRegionsOfTableAction
,MoveRandomRegionOfTableAction
,MoveRegionsOfTableAction
,RemoveColumnAction
,RestartActionBaseAction
,RollingBatchSuspendResumeRsAction
,SnapshotTableAction
,SplitAllRegionOfTableAction
,SplitRandomRegionOfTableAction
,SudoCommandAction
,TruncateTableAction
,UnbalanceKillAndRebalanceAction
,UnbalanceRegionsAction
A (possibly mischievous) action that the ChaosMonkey can perform.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected HBaseCluster
protected Action.ActionContext
protected org.apache.hadoop.hbase.ServerName[]
protected org.apache.hadoop.hbase.ClusterMetrics
protected static final long
static final String
protected static final long
static final String
protected static final long
static final String
protected static final long
static final String
protected static final long
static final String
protected long
protected long
protected long
protected long
protected long
protected Properties
protected boolean
protected static final long
static final String
protected static final long
static final String
protected static final long
static final String
protected static final long
static final String
protected static final long
static final String
protected long
protected long
protected long
protected long
protected long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
org.apache.hadoop.conf.Configuration
getConf()
protected org.apache.hadoop.hbase.ServerName[]
Returns current region servers - active masterprotected abstract org.slf4j.Logger
Retrieve the instance'sLogger
, for use throughout the class hierarchy.void
init
(Action.ActionContext context) protected void
killDataNode
(org.apache.hadoop.hbase.ServerName server) protected void
killJournalNode
(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
startJournalNode
(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)
-
Field Details
-
KILL_MASTER_TIMEOUT_KEY
- See Also:
-
START_MASTER_TIMEOUT_KEY
- See Also:
-
KILL_RS_TIMEOUT_KEY
- See Also:
-
START_RS_TIMEOUT_KEY
- See Also:
-
KILL_ZK_NODE_TIMEOUT_KEY
- See Also:
-
START_ZK_NODE_TIMEOUT_KEY
- See Also:
-
KILL_DATANODE_TIMEOUT_KEY
- See Also:
-
START_DATANODE_TIMEOUT_KEY
- See Also:
-
KILL_NAMENODE_TIMEOUT_KEY
- See Also:
-
START_NAMENODE_TIMEOUT_KEY
- See Also:
-
KILL_MASTER_TIMEOUT_DEFAULT
- See Also:
-
START_MASTER_TIMEOUT_DEFAULT
- See Also:
-
KILL_RS_TIMEOUT_DEFAULT
- See Also:
-
START_RS_TIMEOUT_DEFAULT
- See Also:
-
KILL_ZK_NODE_TIMEOUT_DEFAULT
- See Also:
-
START_ZK_NODE_TIMEOUT_DEFAULT
- See Also:
-
KILL_DATANODE_TIMEOUT_DEFAULT
- See Also:
-
START_DATANODE_TIMEOUT_DEFAULT
- See Also:
-
KILL_NAMENODE_TIMEOUT_DEFAULT
- See Also:
-
START_NAMENODE_TIMEOUT_DEFAULT
- See Also:
-
context
-
cluster
-
initialStatus
-
initialServers
-
monkeyProps
-
killMasterTimeout
-
startMasterTimeout
-
killRsTimeout
-
startRsTimeout
-
killZkNodeTimeout
-
startZkNodeTimeout
-
killDataNodeTimeout
-
startDataNodeTimeout
-
killNameNodeTimeout
-
startNameNodeTimeout
-
skipMetaRS
-
-
Constructor Details
-
Action
public Action()
-
-
Method Details
-
getLogger
Retrieve the instance'sLogger
, for use throughout the class hierarchy. -
init
- Throws:
IOException
-
perform
- Throws:
Exception
-
getCurrentServers
Returns current region servers - active master- Throws:
IOException
-
killMaster
- Throws:
IOException
-
startMaster
- Throws:
IOException
-
stopRs
- Throws:
IOException
-
suspendRs
- Throws:
IOException
-
resumeRs
- Throws:
IOException
-
killRs
- Throws:
IOException
-
startRs
- Throws:
IOException
-
killZKNode
- Throws:
IOException
-
startZKNode
- Throws:
IOException
-
killDataNode
- Throws:
IOException
-
startDataNode
- Throws:
IOException
-
killNameNode
- Throws:
IOException
-
startNameNode
- Throws:
IOException
-
killJournalNode
- Throws:
IOException
-
startJournalNode
- Throws:
IOException
-
unbalanceRegions
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 - Throws:
Exception
-
forceBalancer
- Throws:
Exception
-
setBalancer
- Throws:
Exception
-
getConf
-
modifyAllTableColumns
protected void modifyAllTableColumns(org.apache.hadoop.hbase.TableName tableName, BiConsumer<String, org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder> transform) throws IOExceptionApply a transform to all columns in a given table. If there are no columns in a table or if the context is stopping does nothing.- Parameters:
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 them- Throws:
IOException
-
modifyAllTableColumns
protected void modifyAllTableColumns(org.apache.hadoop.hbase.TableName tableName, Consumer<org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder> transform) throws IOException Apply a transform to all columns in a given table. If there are no columns in a table or if the context is stopping does nothing.- Parameters:
tableName
- the table to modifytransform
- the modification to perform on each column family descriptor builder- Throws:
IOException
-