Package org.apache.ambari.server.controller

Examples of org.apache.ambari.server.controller.ActionRequest


      if (PropertyHelper.getPropertyCategory(propertyid).equals("parameters")
          && null != entry.getValue()) {
        params.put(PropertyHelper.getPropertyName(propertyid), entry.getValue().toString());
      }
    }
    return new ActionRequest(
        (Stringproperties.get(ACTION_CLUSTER_NAME_PROPERTY_ID),
        (Stringproperties.get(ACTION_SERVICE_NAME_PROPERTY_ID),
        (Stringproperties.get(ACTION_ACTION_NAME_PROPERTY_ID),
        params);
  }
View Full Code Here


  public static class ActionRequestSetMatcher extends HashSet<ActionRequest> implements IArgumentMatcher {

    private final ActionRequest actionRequest;

    public ActionRequestSetMatcher(String clusterName, String serviceName, String actionName) {
      this.actionRequest = new ActionRequest(clusterName, serviceName, actionName, null);
      add(this.actionRequest);
    }
View Full Code Here

          propertyCategory.equals("parameters") &&
          null != entry.getValue()) {
        params.put(PropertyHelper.getPropertyName(propertyid), entry.getValue().toString());
      }
    }
    return new ActionRequest(
        (Stringproperties.get(ACTION_CLUSTER_NAME_PROPERTY_ID),
        (Stringproperties.get(ACTION_SERVICE_NAME_PROPERTY_ID),
        (Stringproperties.get(ACTION_ACTION_NAME_PROPERTY_ID),
        params);
  }
View Full Code Here

          propertyCategory.equals("parameters") &&
          null != entry.getValue()) {
        params.put(PropertyHelper.getPropertyName(propertyid), entry.getValue().toString());
      }
    }
    return new ActionRequest(
        (Stringproperties.get(ACTION_CLUSTER_NAME_PROPERTY_ID),
        (Stringproperties.get(ACTION_SERVICE_NAME_PROPERTY_ID),
        (Stringproperties.get(ACTION_ACTION_NAME_PROPERTY_ID),
        params);
  }
View Full Code Here

      NoSuchResourceException, NoSuchParentResourceException {

    final Set<ActionRequest> requests = new HashSet<ActionRequest>();
    if (predicate != null) {
      for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
        ActionRequest actionReq = getRequest(propertyMap);
        LOG.debug("Received a get request for Action with"
            + ", actionName = " + actionReq.getActionName());
        requests.add(actionReq);
      }
    } else {
      LOG.debug("Received a get request for all Actions");
      requests.add(ActionRequest.getAllRequest());
View Full Code Here

    throw new UnsupportedOperationException("Not currently supported.");
  }

  private ActionRequest getRequest(Map<String, Object> properties) {
    ActionRequest ar = new ActionRequest(
        (String) properties.get(ACTION_NAME_PROPERTY_ID),
        (String) properties.get(ACTION_TYPE_PROPERTY_ID),
        (String) properties.get(INPUTS_PROPERTY_ID),
        (String) properties.get(TARGET_SERVICE_PROPERTY_ID),
        (String) properties.get(TARGET_COMPONENT_PROPERTY_ID),
View Full Code Here

  public static class ActionRequestSetMatcher extends HashSet<ActionRequest> implements IArgumentMatcher {

    private final ActionRequest actionRequest;

    public ActionRequestSetMatcher(String clusterName, String serviceName, String actionName) {
      this.actionRequest = new ActionRequest(clusterName, serviceName, actionName, null);
      add(this.actionRequest);
    }
View Full Code Here

  public static class ActionRequestSetMatcher extends HashSet<ActionRequest> implements IArgumentMatcher {

    private final ActionRequest actionRequest;

    public ActionRequestSetMatcher(String clusterName, String serviceName, String actionName) {
      this.actionRequest = new ActionRequest(clusterName, serviceName, actionName, null);
      add(this.actionRequest);
    }
View Full Code Here

    for (final Map<String, Object> properties : request.getProperties()) {
      createResources(new Command<Void>() {
        @Override
        public Void invoke() throws AmbariException {
          ActionRequest actionReq = getRequest(properties);
          LOG.info("Received a create request for Action with"
              + ", actionName = " + actionReq.getActionName()
              + ", actionType = " + actionReq.getActionType()
              + ", description = " + actionReq.getDescription()
              + ", service = " + actionReq.getTargetService());

          createActionDefinition(actionReq);
          return null;
        }
      });
View Full Code Here

    RequestStatusResponse response;

    for (Map<String, Object> requestPropertyMap : request.getProperties()) {
      Set<Map<String, Object>> propertyMaps = getPropertyMaps(requestPropertyMap, predicate);
      for (Map<String, Object> propertyMap : propertyMaps) {
        ActionRequest actionReq = getRequest(propertyMap);
        LOG.info("Received a update request for Action with"
            + ", actionName = " + actionReq.getActionName()
            + ", actionType = " + actionReq.getActionType()
            + ", description = " + actionReq.getDescription()
            + ", timeout = " + actionReq.getDefaultTimeout());

        requests.add(actionReq);
      }
    }
    response = modifyResources(new Command<RequestStatusResponse>() {
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.controller.ActionRequest

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.