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

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


          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 id : ids) {
          Map<String, PropertyInfo> propertyInfoMap = getPropertyInfoMap(getComponentName(resource), 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.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

      String requestedPropertyId = 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('[');
View Full Code Here

    HashMap<String, Object> metricHolder = stormObjectReader.readValue(in);
    for (String category : ids) {
      Map<String, PropertyInfo> defProps = getComponentMetrics().get(STORM_REST_API);
      for (Map.Entry<String, PropertyInfo> depEntry : defProps.entrySet()) {
        if (depEntry.getKey().startsWith(category)) {
          PropertyInfo propInfo = depEntry.getValue();
          String propName = propInfo.getPropertyId();
          Object propertyValue = metricHolder.get(propName);
          String absId = PropertyHelper.getPropertyId(category, propName);
          // TODO: Maybe cast to int
          resource.setProperty(absId, propertyValue);
        }
View Full Code Here

          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

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

      for (Map.Entry<String, PropertyInfo> entry: propertyInfoMap.entrySet()) {
        String       propertyKey  = entry.getKey();
        PropertyInfo propertyInfo = entry.getValue();
        String       propertyId   = propertyInfo.getPropertyId();
        TemporalInfo temporalInfo = request.getTemporalInfo(id);

        if ((propertyInfo.isPointInTime() && temporalInfo == null) ||
            (propertyInfo.isTemporal()    && temporalInfo != null)) {

          long startTime;
          long endTime;

          if (temporalInfo != null) {
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

      String requestedPropertyId = 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>();
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.