Package org.apache.ambari.server.controller

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


    return resources;
  }

  private RootServiceComponentRequest getRequest(Map<String, Object> properties) {
    return new RootServiceComponentRequest((String) properties.get(SERVICE_NAME_PROPERTY_ID),
                                           (String) properties.get(COMPONENT_NAME_PROPERTY_ID));
  }
View Full Code Here


  @Override
  public Set<Resource> getResources(Request request, Predicate predicate)
      throws SystemException, UnsupportedPropertyException,
      NoSuchResourceException, NoSuchParentResourceException {

    final RootServiceComponentRequest rootServiceComponentRequest = getRequest(PredicateHelper
        .getProperties(predicate));
    Set<String> requestedIds = getRequestPropertyIds(request, predicate);

    Set<RootServiceComponentResponse> responses = getResources(new Command<Set<RootServiceComponentResponse>>() {
      @Override
      public Set<RootServiceComponentResponse> invoke() throws AmbariException {
        return getManagementController().getRootServiceComponents(
            Collections.singleton(rootServiceComponentRequest));
      }
    });

    Set<Resource> resources = new HashSet<Resource>();

    for (RootServiceComponentResponse response : responses) {
      Resource resource = new ResourceImpl(Resource.Type.RootServiceComponent);

      setResourceProperty(resource, SERVICE_NAME_PROPERTY_ID,
          rootServiceComponentRequest.getServiceName(), requestedIds);
     
      setResourceProperty(resource, COMPONENT_NAME_PROPERTY_ID,
          response.getComponentName(), requestedIds);
     
      setResourceProperty(resource, PROPERTIES_PROPERTY_ID,
View Full Code Here

    return resources;
  }

  private RootServiceComponentRequest getRequest(Map<String, Object> properties) {
    return new RootServiceComponentRequest((String) properties.get(SERVICE_NAME_PROPERTY_ID),
                                           (String) properties.get(COMPONENT_NAME_PROPERTY_ID));
  }
View Full Code Here

    return resources;
  }

  private RootServiceComponentRequest getRequest(Map<String, Object> properties) {
    return new RootServiceComponentRequest((String) properties.get(SERVICE_NAME_PROPERTY_ID),
                                           (String) properties.get(COMPONENT_NAME_PROPERTY_ID));
  }
View Full Code Here

TOP

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

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.