public void setStackId(StackId stackId) {
    this.stackId = stackId;
  }
Sets the stack to use for generating stack-associated values for a
command. In some cases the cluster's stack is not the correct one to use,
such as when distributing a repository.

@param stackId
         the stackId to use for stack-based properties on the command.
ambari-server/src/main/java/org/apache/ambari/server/controller/ActionExecutionContext.java