public class AmbariCustomCommandExecutionHelper extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
DECOMMISSION_COMMAND_NAME |
protected static String |
SERVICE_CHECK_COMMAND_NAME |
Constructor and Description |
---|
AmbariCustomCommandExecutionHelper() |
Modifier and Type | Method and Description |
---|---|
void |
addExecutionCommandsToStage(ActionExecutionContext actionExecutionContext,
Stage stage,
Map<String,String> hostLevelParams)
Other than Service_Check and Decommission all other commands are pass-through
|
void |
addServiceCheckAction(Stage stage,
String hostname,
String smokeTestRole,
long nowTimestamp,
String serviceName,
String componentName,
Map<String,String> actionParameters,
Map<String,String> hostLevelParams)
Creates and populates service check EXECUTION_COMMAND for host.
|
String |
getRepoInfo(Cluster cluster,
Host host)
Get repository info given a cluster and host.
|
void |
validateAction(ExecuteActionRequest actionRequest)
Validate custom command and throw exception is invalid request.
|
protected static final String SERVICE_CHECK_COMMAND_NAME
protected static final String DECOMMISSION_COMMAND_NAME
public void addServiceCheckAction(Stage stage, String hostname, String smokeTestRole, long nowTimestamp, String serviceName, String componentName, Map<String,String> actionParameters, Map<String,String> hostLevelParams) throws AmbariException
AmbariException
public void validateAction(ExecuteActionRequest actionRequest) throws AmbariException
actionRequest
- AmbariException
public void addExecutionCommandsToStage(ActionExecutionContext actionExecutionContext, Stage stage, Map<String,String> hostLevelParams) throws AmbariException
actionExecutionContext
- received request to execute a commandstage
- the initial stage for task creationhostLevelParams
- specific parameters for the hostsAmbariException
public String getRepoInfo(Cluster cluster, Host host) throws AmbariException
cluster
- host
- AmbariException
Copyright © 2015. All rights reserved.