public class ActionExecutionContext extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ActionExecutionContext.ExecutionCommandVisitor
Interface that allows a final attempt to setting values on an
ExecutionCommand |
| Constructor and Description |
|---|
ActionExecutionContext(String clusterName,
String actionName,
List<RequestResourceFilter> resourceFilters) |
ActionExecutionContext(String clusterName,
String commandName,
List<RequestResourceFilter> resourceFilters,
Map<String,String> parameters) |
ActionExecutionContext(String clusterName,
String actionName,
List<RequestResourceFilter> resourceFilters,
Map<String,String> parameters,
TargetHostType targetType,
Integer timeout,
String expectedServiceName,
String expectedComponentName)
Create an ActionExecutionContext to execute an action from a request
|
| Modifier and Type | Method and Description |
|---|---|
void |
addVisitor(ActionExecutionContext.ExecutionCommandVisitor visitor)
Adds a command visitor that will be invoked after a command is created.
|
String |
getActionName() |
String |
getClusterName() |
String |
getExpectedComponentName() |
String |
getExpectedServiceName() |
RequestOperationLevel |
getOperationLevel() |
Map<String,String> |
getParameters() |
List<RequestResourceFilter> |
getResourceFilters() |
StackId |
getStackId()
Gets the stack to use for generating stack-associated values for a
command.
|
TargetHostType |
getTargetType() |
Integer |
getTimeout() |
boolean |
isFailureAutoSkipped()
Gets whether skippable actions that failed are automatically skipped.
|
boolean |
isFutureCommand()
Gets whether Ambari should skip all kinds of command verifications while
scheduling since this command runs in the future and might not be
considered "valid".
|
boolean |
isMaintenanceModeHostExcluded()
Gets whether hosts in maintenance mode should be excluded from the command.
|
boolean |
isRetryAllowed()
Gets whether the action can be retried if it failed.
|
void |
setAutoSkipFailures(boolean autoSkipFailures)
Sets whether skippable action that failed are automatically skipped.
|
void |
setIsFutureCommand(boolean isFutureCommand)
Sets whether Ambari should skip all kinds of command verifications while
scheduling since this command runs in the future and might not be
considered "valid".
|
void |
setMaintenanceModeHostExcluded(boolean excluded)
Sets whether hosts in maintenance mode should be excluded from the command.
|
void |
setOperationLevel(RequestOperationLevel operationLevel) |
void |
setRetryAllowed(boolean allowRetry)
Sets whether the action can be retried if it fails.
|
void |
setStackId(StackId stackId)
Sets the stack to use for generating stack-associated values for a
command.
|
void |
setTimeout(Integer timeout) |
String |
toString() |
void |
visitAll(ExecutionCommand command)
Called as a way to post-process the command after it has been created and various objects
have been set.
|
public ActionExecutionContext(String clusterName, String actionName, List<RequestResourceFilter> resourceFilters, Map<String,String> parameters, TargetHostType targetType, Integer timeout, String expectedServiceName, String expectedComponentName)
public ActionExecutionContext(String clusterName, String actionName, List<RequestResourceFilter> resourceFilters)
public String getClusterName()
public String getActionName()
public TargetHostType getTargetType()
public Integer getTimeout()
public void setTimeout(Integer timeout)
public List<RequestResourceFilter> getResourceFilters()
public RequestOperationLevel getOperationLevel()
public void setOperationLevel(RequestOperationLevel operationLevel)
public String getExpectedServiceName()
public String getExpectedComponentName()
public boolean isRetryAllowed()
true).true if the action can be retried if it fails.public void setRetryAllowed(boolean allowRetry)
allowRetry - true if the action can be retried if it fails.public boolean isFailureAutoSkipped()
public void setAutoSkipFailures(boolean autoSkipFailures)
autoSkipFailures - true to automatically skip failures which are marked as
skippable.public StackId getStackId()
public void setStackId(StackId stackId)
stackId - the stackId to use for stack-based properties on the command.public void addVisitor(ActionExecutionContext.ExecutionCommandVisitor visitor)
visitor - the visitorpublic boolean isMaintenanceModeHostExcluded()
true to exclude any hosts in maintenance mode from the
command, false to include hosts which are in maintenance
mode.public void setMaintenanceModeHostExcluded(boolean excluded)
excluded - true to exclude any hosts in maintenance mode from the
command, false to include hosts which are in maintenance
mode.public void visitAll(ExecutionCommand command)
command - the commandpublic boolean isFutureCommand()
true if the command is scheduled to run in the future.public void setIsFutureCommand(boolean isFutureCommand)
isFutureCommand - true to have Ambari skip verification of things like
component hosts while scheduling commands.Copyright © 2022 Apache Software Foundation. All rights reserved.