Package org.apache.ambari.server.actionmanager

Examples of org.apache.ambari.server.actionmanager.TargetHostType


      }
    }

    //Find target hosts to execute
    if (actionContext.getHosts().isEmpty()) {
      TargetHostType hostType = actionContext.getTargetType();
      switch (hostType) {
        case ALL:
          actionContext.getHosts().addAll(candidateHosts);
          break;
        case ANY:
View Full Code Here


        for (ActionDefinitionSpec ad : adx.actionDefinitions()) {
          LOG.debug("Read action definition = " + ad.toString());
          StringBuilder errorReason =
              new StringBuilder("Error while parsing action definition. ").append(ad.toString()).append(" --- ");

          TargetHostType targetType = safeValueOf(TargetHostType.class, ad.getTargetType(), errorReason);
          ActionType actionType = safeValueOf(ActionType.class, ad.getActionType(), errorReason);

          Short defaultTimeout = MIN_TIMEOUT;
          if (ad.getDefaultTimeout() != null && !ad.getDefaultTimeout().isEmpty()) {
            defaultTimeout = Short.parseShort(ad.getDefaultTimeout());
View Full Code Here

    List<String> targetHosts = resourceFilter.getHostNames();

    //Find target hosts to execute
    if (targetHosts.isEmpty()) {
      TargetHostType hostType = actionContext.getTargetType();
      switch (hostType) {
        case ALL:
          targetHosts.addAll(candidateHosts);
          break;
        case ANY:
View Full Code Here

    List<String> targetHosts = resourceFilter.getHostNames();

    //Find target hosts to execute
    if (targetHosts.isEmpty()) {
      TargetHostType hostType = actionContext.getTargetType();
      switch (hostType) {
        case ALL:
          targetHosts.addAll(candidateHosts);
          break;
        case ANY:
View Full Code Here

    LOG.info("Received a createActionDefinition request = " + request.toString());
    if (request.getTargetType() == null || request.getActionType() == null) {
      throw new AmbariException("Both target_type and action_type must be specified.");
    }
    TargetHostType targetType = TargetHostType.valueOf(request.getTargetType());
    ActionType actionType = ActionType.valueOf(request.getActionType());

    Short defaultTimeout = CustomActionDBAccessorImpl.MIN_TIMEOUT;
    if (request.getDefaultTimeout() != null && !request.getDefaultTimeout().isEmpty()) {
      defaultTimeout = Short.parseShort(request.getDefaultTimeout());
View Full Code Here

    for (ActionRequest request : requests) {
      if (null != request.getInputs() || null != request.getTargetService()
          || null != request.getTargetComponent()) {
        throw new AmbariException("Cannot update inputs, target_service, or target_component");
      }
      TargetHostType targetType = request.getTargetType() == null ? null
          : TargetHostType.valueOf(request.getTargetType());
      ActionType actionType = request.getActionType() == null ? null : ActionType.valueOf(request.getActionType());
      Short defaultTimeout = null;
      if (request.getDefaultTimeout() != null && !request.getDefaultTimeout().isEmpty()) {
        defaultTimeout = Short.parseShort(request.getDefaultTimeout());
View Full Code Here

      }
    }

    //Find target hosts to execute
    if (actionContext.getHosts().isEmpty()) {
      TargetHostType hostType = actionContext.getTargetType();
      switch (hostType) {
        case ALL:
          actionContext.getHosts().addAll(candidateHosts);
          break;
        case ANY:
View Full Code Here

    List<String> targetHosts = resourceFilter.getHostNames();

    //Find target hosts to execute
    if (targetHosts.isEmpty()) {
      TargetHostType hostType = actionContext.getTargetType();
      switch (hostType) {
        case ALL:
          targetHosts.addAll(candidateHosts);
          break;
        case ANY:
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.actionmanager.TargetHostType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.