Package org.apache.ambari.server.controller.internal

Examples of org.apache.ambari.server.controller.internal.PropertyInfo


          getPropertyInfoMap(getComponentName(resource), id, propertyInfoMap);

          for (Map.Entry<String, PropertyInfo> entry : propertyInfoMap.entrySet()) {
            String propertyId = entry.getKey();
            PropertyInfo propertyInfo = entry.getValue();

            TemporalInfo temporalInfo = request.getTemporalInfo(id);

            if ((temporalInfo == null && propertyInfo.isPointInTime()) || (temporalInfo != null && propertyInfo.isTemporal())) {
              RRDRequest rrdRequest = requests.get(temporalInfo);
              if (rrdRequest == null) {
                rrdRequest = new RRDRequest(clusterName, temporalInfo);
                requests.put(temporalInfo, rrdRequest);
              }
              rrdRequest.putResource(key, resource);             
              rrdRequest.putPropertyId(propertyInfo.getPropertyId(), propertyId);
            }
          }
        }
      }
    }
View Full Code Here


          for (Map.Entry<String, Metric> metricEntry : componentEntry.getValue().entrySet()) {
            String property = metricEntry.getKey();
            Metric metric   = metricEntry.getValue();

            metrics.put(property, new PropertyInfo(metric.getMetric(), metric.isTemporal(), metric.isPointInTime()));
          }
          componentMetrics.put(componentEntry.getKey(), metrics);
        }
        resourceMetrics.put(resourceEntry.getKey(), componentMetrics);
      }
View Full Code Here

        Map<String, PropertyInfo> metrics = componentPropertyInfoMap.get(getComponentName(resource));

        if (metrics != null) {
          for (String propertyId : ids) {
            PropertyInfo propertyInfo = metrics.get(propertyId);
            if (propertyInfo != null) {
              TemporalInfo temporalInfo = request.getTemporalInfo(propertyId);

              if ((temporalInfo == null && propertyInfo.isPointInTime()) || (temporalInfo != null && propertyInfo.isTemporal())) {
                RRDRequest rrdRequest = requests.get(temporalInfo);
                if (rrdRequest == null) {
                  rrdRequest = new RRDRequest(clusterName, temporalInfo);
                  requests.put(temporalInfo, rrdRequest);
                }
                rrdRequest.putResource(key, resource);
                rrdRequest.putPropertyId(propertyInfo.getPropertyId(), propertyId);
              }
            }
          }
        }
      }
View Full Code Here

          for (Map.Entry<String, Metric> metricEntry : componentEntry.getValue().entrySet()) {
            String property = metricEntry.getKey();
            Metric metric   = metricEntry.getValue();

            metrics.put(property, new PropertyInfo(metric.getMetric(), metric.isTemporal(), metric.isPointInTime()));
          }
          componentMetrics.put(componentEntry.getKey(), metrics);
        }
        resourceMetrics.put(resourceEntry.getKey(), componentMetrics);
      }
View Full Code Here

  private Map<String, Map<String, String>> getPropertyIdMaps(Request request, Set<String> ids) {
    Map<String, Map<String, String>> propertyMap = new HashMap<String, Map<String, String>>();

    for (String propertyId : ids) {
      PropertyInfo propertyInfo = componentMetrics.get(propertyId);

      if (propertyInfo != null) {

        TemporalInfo temporalInfo = request.getTemporalInfo(propertyId);

        if (temporalInfo != null && propertyInfo.isTemporal()) {
          String propertyName = propertyInfo.getPropertyId();
          String report = null;
          // format : report_name.metric_name
          int dotIndex = propertyName.lastIndexOf('.');
          if (dotIndex != -1){
            report = propertyName.substring(0, dotIndex);
View Full Code Here

        }
      }

      for (String propertyId : ids) {

        PropertyInfo propertyInfo = metrics.get(propertyId);

        if (propertyInfo != null && propertyInfo.isPointInTime()) {

          String property = propertyInfo.getPropertyId();
          String category = "";

          List<String> keyList = new LinkedList<String>();
          int keyStartIndex = property.indexOf('[', 0);
          int firstKeyIndex = keyStartIndex > -1 ? keyStartIndex : property.length();
View Full Code Here

    for (String id : ids) {
      Map<String, PropertyInfo> propertyInfoMap = getPropertyInfoMap("*", id);

      for (Map.Entry<String, PropertyInfo> entry : propertyInfoMap.entrySet()) {
        String propertyId = entry.getKey();
        PropertyInfo propertyInfo = entry.getValue();

        TemporalInfo temporalInfo = request.getTemporalInfo(id);

        if (temporalInfo != null && propertyInfo.isTemporal()) {
          String propertyName = propertyInfo.getPropertyId();
          String report = null;
          // format : report_name.metric_name
          int dotIndex = propertyName.lastIndexOf('.');
          if (dotIndex != -1){
            report = propertyName.substring(0, dotIndex);
View Full Code Here

          for (Map.Entry<String, Metric> metricEntry : componentEntry.getValue().entrySet()) {
            String property = metricEntry.getKey();
            Metric metric   = metricEntry.getValue();

            metrics.put(property, new PropertyInfo(metric.getMetric(), metric.isTemporal(), metric.isPointInTime()));
          }
          componentMetrics.put(componentEntry.getKey(), metrics);
        }
        resourceMetrics.put(resourceEntry.getKey(), componentMetrics);
      }
View Full Code Here

        for (String propertyId : ids) {
          Map<String, PropertyInfo> propertyInfoMap = getPropertyInfoMap(componentName, propertyId);

          for (Map.Entry<String, PropertyInfo> entry : propertyInfoMap.entrySet()) {

            PropertyInfo propertyInfo = entry.getValue();
            propertyId = entry.getKey();

            if (propertyInfo.isPointInTime()) {

              String property = propertyInfo.getPropertyId();
              String category = "";

              List<String> keyList = new LinkedList<String>();
              int keyStartIndex = property.indexOf('[', 0);
              int firstKeyIndex = keyStartIndex > -1 ? keyStartIndex : property.length();
View Full Code Here

          boolean requestAll = getPropertyInfoMap(getComponentName(resource), id, propertyInfoMap);

          for (Map.Entry<String, PropertyInfo> entry : propertyInfoMap.entrySet()) {
            String propertyId = entry.getKey();
            PropertyInfo propertyInfo = entry.getValue();

            TemporalInfo temporalInfo = request.getTemporalInfo(id);

            if ((temporalInfo == null && propertyInfo.isPointInTime()) || (temporalInfo != null && propertyInfo.isTemporal())) {
              RRDRequest rrdRequest = requests.get(temporalInfo);
              if (rrdRequest == null) {
                rrdRequest = new RRDRequest(clusterName, temporalInfo);
                requests.put(temporalInfo, rrdRequest);
              }
              rrdRequest.putResource(key, resource);
              rrdRequest.putPropertyId(propertyInfo.getPropertyId(), propertyId);
              rrdRequest.setRequestAllMetrics(requestAll);
            }
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.controller.internal.PropertyInfo

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.