private void addServiceInfo(Map<String, ServiceInfo> services, AmbariMetaInfo ambariMetaInfo, String stackId, String serviceName) {
      List<String> stackInfo = getStackInfo(stackId);
      LOG.debug(String.format("Stack info list: %s", stackInfo));
      if (stackInfo.size() > 1) {
        try {
          ServiceInfo service = ambariMetaInfo.getService(stackInfo.get(0), stackInfo.get(1), serviceName);
          LOG.debug(String.format("Adding %s to the list of services for loading external Jars...", service.getName()));
          services.put(serviceName, service);
        } catch (AmbariException e) {
          LOG.error(String.format("Failed to obtain service info for stack %s, service name %s", stackId, serviceName), e);
        }
      }
    }
Attempts to execute the task specified using data from the supplied HostRoleCommand and
ExecutionCommand.
<p/>
Retrieves the role parameters from the supplied ExecutionCommand and queries it for the
"ACTON_NAME" property.  The returned String is expected to be the classname of a ServerAction
implementation.  If so, an instance of the implementation class is created and executed
yielding a CommandReport to (eventually) return back to the parent thread.

@param hostRoleCommand  The HostRoleCommand the HostRoleCommand for the relevant task
@param executionCommand the ExecutionCommand for the relevant task
@return the resulting CommandReport
@throws AmbariException
@throws InterruptedException
ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerActionExecutor.java