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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HBaseClusterInterfaceprotected Action.ActionContextprotected org.apache.hadoop.hbase.ServerName[]protected org.apache.hadoop.hbase.ClusterMetricsprotected static final longstatic final Stringprotected static final longstatic final Stringprotected static final longstatic final Stringprotected static final longstatic final Stringprotected static final longstatic final Stringprotected longprotected longprotected longprotected longprotected longprotected Propertiesprotected booleanprotected static final longstatic final Stringprotected static final longstatic final Stringprotected static final longstatic final Stringprotected static final longstatic final Stringprotected static final longstatic final Stringprotected longprotected longprotected longprotected longprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidorg.apache.hadoop.conf.ConfigurationgetConf()protected org.apache.hadoop.hbase.ServerName[]Returns current region servers - active masterprotected abstract org.slf4j.LoggerRetrieve the instance'sLogger, for use throughout the class hierarchy.voidinit(Action.ActionContext context) protected voidkillDataNode(org.apache.hadoop.hbase.ServerName server) protected voidkillJournalNode(org.apache.hadoop.hbase.ServerName server) protected voidkillMaster(org.apache.hadoop.hbase.ServerName server) protected voidkillNameNode(org.apache.hadoop.hbase.ServerName server) protected voidkillRs(org.apache.hadoop.hbase.ServerName server) protected voidkillZKNode(org.apache.hadoop.hbase.ServerName server) protected voidmodifyAllTableColumns(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 voidmodifyAllTableColumns(org.apache.hadoop.hbase.TableName tableName, Consumer<org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder> transform) Apply a transform to all columns in a given table.voidperform()protected voidresumeRs(org.apache.hadoop.hbase.ServerName server) protected voidsetBalancer(boolean onOrOff, boolean synchronous) protected voidstartDataNode(org.apache.hadoop.hbase.ServerName server) protected voidstartJournalNode(org.apache.hadoop.hbase.ServerName server) protected voidstartMaster(org.apache.hadoop.hbase.ServerName server) protected voidstartNameNode(org.apache.hadoop.hbase.ServerName server) protected voidstartRs(org.apache.hadoop.hbase.ServerName server) protected voidstartZKNode(org.apache.hadoop.hbase.ServerName server) protected voidstopRs(org.apache.hadoop.hbase.ServerName server) protected voidsuspendRs(org.apache.hadoop.hbase.ServerName server) protected voidunbalanceRegions(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
-