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

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


      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 (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

    Map<String, Map<String, PropertyInfo>> metrics = PropertyHelper.getJMXPropertyIds(Resource.Type.HostComponent, PropertyHelper.MetricsVersion.HDP1);
    Map<String, PropertyInfo> componentMetrics = metrics.get("HISTORYSERVER");
    Assert.assertNull(componentMetrics);
    componentMetrics = metrics.get("NAMENODE");
    Assert.assertNotNull(componentMetrics);
    PropertyInfo info = componentMetrics.get("metrics/jvm/memHeapUsedM");
    Assert.assertNotNull(info);
    Assert.assertEquals("Hadoop:service=NameNode,name=jvm.memHeapUsedM", info.getPropertyId());

    //version 2
    metrics = PropertyHelper.getJMXPropertyIds(Resource.Type.HostComponent, PropertyHelper.MetricsVersion.HDP2);
    componentMetrics = metrics.get("HISTORYSERVER");
    Assert.assertNotNull(componentMetrics);
    componentMetrics = metrics.get("NAMENODE");
    Assert.assertNotNull(componentMetrics);
    info = componentMetrics.get("metrics/jvm/memHeapUsedM");
    Assert.assertNotNull(info);
    Assert.assertEquals("Hadoop:service=NameNode,name=JvmMetrics.MemHeapUsedM", info.getPropertyId());
  }
View Full Code Here

              Map<String, PropertyInfo> jMetrics = jids.get(gComponent);

              if (jMetrics != null) {
                String gMetric = gMetricEntry.getKey();
                PropertyInfo jProperty = jMetrics.get(gMetric);

                if (jProperty != null) {
                  PropertyInfo gProperty = gMetricEntry.getValue();
                  if (gProperty.isPointInTime()) {
                    String s = type + " : " + gComponent + " : " + gMetric + " : " + gProperty.getPropertyId();
                    set.add(s);
                  }
                }
              }
            }
View Full Code Here

              Map<String, PropertyInfo> jMetrics = jids.get(gComponent);

              if (jMetrics != null) {

                String gMetric = gMetricEntry.getKey();
                PropertyInfo gProperty = gMetricEntry.getValue();

                if (!gProperty.isPointInTime()) {

                  PropertyInfo jProperty = jMetrics.get(gMetric);

                  if (jProperty == null || !jProperty.isPointInTime()) {

                    String s = type + " : " + gComponent + " : " + gMetric + " : " + gProperty.getPropertyId();

                    set.add(s);
                  }
View Full Code Here

            Set<Map.Entry<String, PropertyInfo>> jComponentEntries = jComponentEntry.getValue().entrySet();
            for (Map.Entry<String, PropertyInfo> jMetricEntry : jComponentEntries) {

              String jMetric = jMetricEntry.getKey();

              PropertyInfo jProperty = jMetricEntry.getValue();

              if (jProperty.isTemporal()) {
                String s = type + " : " + jComponent + " : " + jMetric + " : " + jProperty.getPropertyId();

                set.add(s);
              }
            }
          }
View Full Code Here

      Set<Map.Entry<String, PropertyInfo>> gComponentEntries = gComponentEntry.getValue().entrySet();

      for (Map.Entry<String, PropertyInfo> gMetricEntry : gComponentEntries) {

        String gMetric = gMetricEntry.getKey();
        PropertyInfo propertyInfo = gMetricEntry.getValue();

        newMap.put(gMetric.replaceAll("\\$\\d+(\\.\\S+\\(\\S+\\))*", "*"), propertyInfo);
      }
      returnMap.put(gComponent, newMap);
    }
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

    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 (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

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.