@Override
  public ExecutionCommand getExecutionCommand(Cluster cluster,
                                              ServiceComponentHost scHost,
                                              RoleCommand roleCommand) throws AmbariException {
    Map<String, String> hostParamsCmd = customCommandExecutionHelper.createDefaultHostParams(
        cluster, scHost.getServiceComponent().getDesiredStackId());

    Stage stage = createNewStage(0, cluster, 1, "", "{}", "");

    RepositoryVersionEntity repoVersion = null;
    if (null != scHost.getServiceComponent().getDesiredRepositoryVersion()) {
      repoVersion = scHost.getServiceComponent().getDesiredRepositoryVersion();
    } else {
      Service service = cluster.getService(scHost.getServiceName());
      repoVersion = service.getDesiredRepositoryVersion();
    }

    boolean isUpgradeSuspended = cluster.isUpgradeSuspended();
    DatabaseType databaseType = configs.getDatabaseType();
    Map<String, DesiredConfig> clusterDesiredConfigs = cluster.getDesiredConfigs();
    createHostAction(cluster, stage, scHost,
                     roleCommand, null, null, false, repoVersion, isUpgradeSuspended, databaseType,
                     clusterDesiredConfigs, false);
    ExecutionCommand ec = stage.getExecutionCommands().get(scHost.getHostName()).get(0).getExecutionCommand();

    // createHostAction does not take a hostLevelParams but creates one
    hostParamsCmd.putAll(ec.getHostLevelParams());
    ec.getHostLevelParams().putAll(hostParamsCmd);

    // Generate localComponents
    for (ServiceComponentHost sch : cluster.getServiceComponentHosts(scHost.getHostName())) {
      ec.getLocalComponents().add(sch.getServiceComponentName());
    }

    return ec;
  }
Computes os-dependent packages for service/host. Does not take into
account package dependencies for ANY_OS. Instead of this method
you should use getPackagesForServiceHost()
because it takes into account both os-dependent and os-independent lists
of packages for service.
@param hostParams may be modified (appended SERVICE_REPO_INFO)
@return a list of os-dependent packages for host
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java