public class AddCPULoadAction extends SudoCommandAction
Action.ActionContext
Modifier and Type | Field and Description |
---|---|
private static String |
CPU_LOAD_COMMAND |
private long |
duration |
protected static org.slf4j.Logger |
LOG |
private long |
processes |
clusterManager, timeout
cluster, context, initialServers, initialStatus, KILL_DATANODE_TIMEOUT_DEFAULT, KILL_DATANODE_TIMEOUT_KEY, KILL_MASTER_TIMEOUT_DEFAULT, KILL_MASTER_TIMEOUT_KEY, KILL_NAMENODE_TIMEOUT_DEFAULT, KILL_NAMENODE_TIMEOUT_KEY, KILL_RS_TIMEOUT_DEFAULT, KILL_RS_TIMEOUT_KEY, KILL_ZK_NODE_TIMEOUT_DEFAULT, KILL_ZK_NODE_TIMEOUT_KEY, killDataNodeTimeout, killMasterTimeout, killNameNodeTimeout, killRsTimeout, killZkNodeTimeout, START_DATANODE_TIMEOUT_DEFAULT, START_DATANODE_TIMEOUT_KEY, START_MASTER_TIMEOUT_DEFAULT, START_MASTER_TIMEOUT_KEY, START_NAMENODE_TIMEOUT_DEFAULT, START_NAMENODE_TIMEOUT_KEY, START_RS_TIMEOUT_DEFAULT, START_RS_TIMEOUT_KEY, START_ZK_NODE_TIMEOUT_DEFAULT, START_ZK_NODE_TIMEOUT_KEY, startDataNodeTimeout, startMasterTimeout, startNameNodeTimeout, startRsTimeout, startZkNodeTimeout
Constructor and Description |
---|
AddCPULoadAction(long duration,
long processes,
long timeout)
Add high load to cpu
|
Modifier and Type | Method and Description |
---|---|
private String |
getCommand() |
protected void |
localPerform() |
init, perform
forceBalancer, getConf, getCurrentServers, killDataNode, killMaster, killNameNode, killRs, killZKNode, modifyAllTableColumns, modifyAllTableColumns, resumeRs, setBalancer, startDataNode, startMaster, startNameNode, startRs, startZKNode, stopRs, suspendRs, unbalanceRegions
protected static final org.slf4j.Logger LOG
private static final String CPU_LOAD_COMMAND
private final long duration
private long processes
public AddCPULoadAction(long duration, long processes, long timeout)
duration
- Duration that this thread should generate the load for in millisecondsprocesses
- The number of parallel processes, should be equal to cpu threads for max loadprotected void localPerform() throws IOException
localPerform
in class SudoCommandAction
IOException
private String getCommand()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.