Package org.apache.ambari.server.controller.spi

Examples of org.apache.ambari.server.controller.spi.PropertyProvider


          response.getActualConfigs(), requestedIds);
      setResourceProperty(resource, HOST_COMPONENT_STALE_CONFIGS_PROPERTY_ID,
          Boolean.valueOf(response.isStaleConfig()), requestedIds);
     
      String componentName = (String)resource.getPropertyValue(HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID);
      PropertyProvider propertyProvider = HOST_COMPONENT_PROPERTIES_PROVIDER.get(componentName);
      if (propertyProvider != null) {
        Set<Resource> resourcesToPopulate = new HashSet<Resource>();
        resourcesToPopulate.add(resource);
        propertyProvider.populateResources(resourcesToPopulate, request, predicate);
      }
     
      resources.add(resource);
    }
    return resources;
View Full Code Here


        setResourceProperty(resource, HOST_COMPONENT_MAINTENANCE_STATE_PROPERTY_ID,
            response.getMaintenanceState(), requestedIds);
      }

      String componentName = (String) resource.getPropertyValue(HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID);
      PropertyProvider propertyProvider = HOST_COMPONENT_PROPERTIES_PROVIDER.get(componentName);
      if (propertyProvider != null) {
        Set<Resource> resourcesToPopulate = new HashSet<Resource>();
        resourcesToPopulate.add(resource);
        propertyProvider.populateResources(resourcesToPopulate, request, predicate);
      }

      resources.add(resource);
    }
    return resources;
View Full Code Here

          if (m.getType().equals("ganglia")) {
            gangliaMap.put(componentName, getPropertyInfo(m));
          } else if (m.getType().equals("jmx")) {
            jmxMap.put(componentName, getPropertyInfo(m));
          } else {
            PropertyProvider pp = getDelegate(m);
            if (null != pp)
              additional.add(pp);
          }
        }
      }
       
      if (gangliaMap.size() > 0) {
        GangliaPropertyProvider gpp = type.equals (Resource.Type.Component) ?
          new GangliaComponentPropertyProvider(gangliaMap,
              streamProvider, sslConfig, gangliaHostProvider,
              clusterNamePropertyId, componentNamePropertyId) :
          new GangliaHostComponentPropertyProvider(gangliaMap,
              streamProvider, sslConfig, gangliaHostProvider,
              clusterNamePropertyId, hostNamePropertyId, componentNamePropertyId);
         
          gpp.populateResources(resources, request, predicate);
      } else {
        defaultGanglia.populateResources(resources, request, predicate);
      }
     
      if (jmxMap.size() > 0) {
        JMXPropertyProvider jpp = new JMXPropertyProvider(jmxMap, streamProvider,
            jmxHostProvider, clusterNamePropertyId, hostNamePropertyId,
            componentNamePropertyId, jmxStatePropertyId, Collections.singleton("STARTED"));
       
        jpp.populateResources(resources, request, predicate);
      } else {
        defaultJmx.populateResources(resources, request, predicate);
      }
     
      for (PropertyProvider pp : additional) {
        pp.populateResources(resources, request, predicate);
      }

    } catch (Exception e) {
      e.printStackTrace();
      throw new SystemException("Error loading deferred resources", e);
View Full Code Here

          response.getActualConfigs(), requestedIds);
      setResourceProperty(resource, HOST_COMPONENT_STALE_CONFIGS_PROPERTY_ID,
          Boolean.valueOf(response.isStaleConfig()), requestedIds);
     
      String componentName = (String)resource.getPropertyValue(HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID);
      PropertyProvider propertyProvider = HOST_COMPONENT_PROPERTIES_PROVIDER.get(componentName);
      if (propertyProvider != null) {
        Set<Resource> resourcesToPopulate = new HashSet<Resource>();
        resourcesToPopulate.add(resource);
        propertyProvider.populateResources(resourcesToPopulate, request, predicate);
      }
     
      resources.add(resource);
    }
    return resources;
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.controller.spi.PropertyProvider

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.