public class ExecutionCommand extends AgentCommand
Modifier and Type | Class and Description |
---|---|
static interface |
ExecutionCommand.KeyNames
Contains key name strings.
|
AgentCommand.AgentCommandType
Constructor and Description |
---|
ExecutionCommand() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
Map<String,Set<String>> |
getClusterHostInfo() |
String |
getClusterId() |
Map<String,String> |
getClusterLevelParams() |
String |
getClusterName() |
String |
getCommandId() |
Map<String,String> |
getCommandParams() |
String |
getComponentName() |
Map<String,Map<String,String>> |
getComponentVersionMap() |
Map<String,Map<String,String>> |
getConfigurationCredentials() |
Map<String,Map<String,String>> |
getConfigurations() |
String |
getCredentialStoreEnabled()
Get a value indicating whether this service is enabled
for credential store use.
|
Map<String,String> |
getHostLevelParams() |
String |
getHostname() |
List<Map<String,String>> |
getKerberosCommandParams()
Returns parameters for kerberos commands
|
Set<String> |
getLocalComponents() |
CommandRepository |
getRepositoryFile()
Gets the repository file which was set on this command.
|
String |
getRole() |
RoleCommand |
getRoleCommand() |
Map<String,Object> |
getRoleParameters()
Gets the object-based role parameters for the command.
|
Map<String,String> |
getRoleParams() |
String |
getServiceName() |
String |
getServiceType() |
long |
getTaskId() |
UpgradeSummary |
getUpgradeSummary()
Gets the upgrade summary if there is an active upgrade in the cluster.
|
Boolean |
getUseLatestConfigs() |
int |
hashCode() |
boolean |
isOverrideConfigs()
Gets whether configuration tags shoudl be refreshed right before the
command is scheduled.
|
void |
setClusterHostInfo(Map<String,Set<String>> clusterHostInfo) |
void |
setClusterId(String clusterId) |
void |
setClusterLevelParams(Map<String,String> clusterLevelParams) |
void |
setClusterName(String clusterName) |
void |
setCommandParams(Map<String,String> commandParams) |
void |
setComponentName(String componentName) |
void |
setComponentVersions(Cluster cluster)
Used to set a map of {service -> { component -> version}}.
|
void |
setConfigurationCredentials(Map<String,Map<String,String>> configurationCredentials) |
void |
setConfigurations(Map<String,Map<String,String>> configurations) |
void |
setCredentialStoreEnabled(String credentialStoreEnabled)
Set a value indicating whether this service is enabled
for credential store use.
|
void |
setHostLevelParams(Map<String,String> params) |
void |
setHostname(String hostname) |
void |
setKerberosCommandParams(List<Map<String,String>> params)
Sets parameters for kerberos commands
|
void |
setLocalComponents(Set<String> localComponents) |
void |
setOverrideConfigs(boolean overrideConfigs) |
void |
setRepositoryFile(CommandRepository repository)
Sets the
CommandRepository which will be sent down to the agent
instructing it on which repository file to create on the host. |
void |
setRequestAndStage(long requestId,
long stageId)
Sets the request and stage on this command.
|
void |
setRole(String role) |
void |
setRoleCommand(RoleCommand cmd) |
void |
setRoleParameters(Map<String,Object> params)
Sets the role parameters for the command.
|
void |
setRoleParams(Map<String,String> roleParams)
Sets the roleParams for the command.
|
void |
setServiceName(String serviceName) |
void |
setServiceType(String serviceType) |
void |
setTaskId(long taskId) |
void |
setUpgradeSummary(UpgradeSummary upgradeSummary)
Sets the upgrade summary if there is an active upgrade in the cluster.
|
void |
setUseLatestConfigs(Boolean useLatestConfigs) |
String |
toString() |
getCommandType, setCommandType
public void setConfigurationCredentials(Map<String,Map<String,String>> configurationCredentials)
public String getCommandId()
public void setRequestAndStage(long requestId, long stageId)
commandId
field is
automatically constructed from these as requestId-stageId.requestId
- the ID of the execution request.stageId
- the ID of the stage request.public String toString()
toString
in class AgentCommand
public long getTaskId()
public void setTaskId(long taskId)
public String getRole()
public void setRole(String role)
public void setRoleParams(Map<String,String> roleParams)
setRoleParameters(java.util.Map<java.lang.String, java.lang.Object>)
roleParams
- public RoleCommand getRoleCommand()
public void setRoleCommand(RoleCommand cmd)
public String getClusterName()
public void setClusterName(String clusterName)
public String getHostname()
public void setHostname(String hostname)
public boolean isOverrideConfigs()
public void setOverrideConfigs(boolean overrideConfigs)
public String getServiceName()
public void setServiceName(String serviceName)
public String getServiceType()
public void setServiceType(String serviceType)
public String getCredentialStoreEnabled()
public void setCredentialStoreEnabled(String credentialStoreEnabled)
credentialStoreEnabled
- public String getComponentName()
public void setComponentName(String componentName)
public List<Map<String,String>> getKerberosCommandParams()
public void setKerberosCommandParams(List<Map<String,String>> params)
params
- for kerberos commandspublic String getClusterId()
public void setClusterId(String clusterId)
public CommandRepository getRepositoryFile()
ExecutionCommandWrapper
when it is about to execute the command.setRepositoryFile(CommandRepository)
public void setRepositoryFile(CommandRepository repository)
CommandRepository
which will be sent down to the agent
instructing it on which repository file to create on the host. In most
cases, it is not necessary to set this file since the
ExecutionCommandWrapper
will set it in the event that it is
missing. In fact, it is only appropriate to set this file in the following
cases:
repository
- the command repository instance.public Map<String,Object> getRoleParameters()
public void setRoleParameters(Map<String,Object> params)
setRoleParams(Map)
,
as this form will pass values as structured data, as opposed to unstructured, escaped json.params
- public Boolean getUseLatestConfigs()
public void setUseLatestConfigs(Boolean useLatestConfigs)
public void setComponentVersions(Cluster cluster) throws org.apache.ambari.server.AmbariException
cluster
- the cluster from which to build the maporg.apache.ambari.server.AmbariException
public void setUpgradeSummary(UpgradeSummary upgradeSummary)
upgradeSummary
- the upgrade or null
for none.public UpgradeSummary getUpgradeSummary()
null
for none.Copyright © 2022 Apache Software Foundation. All rights reserved.