class PropertyHelper {

  public static Map<String, org.apache.ambari.server.state.stack.Metric> processRpcMetricDefinition(String metricType,
      String componentName, String propertyId, org.apache.ambari.server.state.stack.Metric metric) {
    Map<String, org.apache.ambari.server.state.stack.Metric> replacementMap = null;
    if (componentName.equalsIgnoreCase("NAMENODE")) {
      for (Map.Entry<String, List<String>> entry : RPC_METRIC_SUFFIXES.entrySet()) {
        String prefix = entry.getKey();
        if (propertyId.startsWith(prefix)) {
          replacementMap = new HashMap<>();
          for (String suffix : entry.getValue()) {
            String newMetricName;
            if ("jmx".equals(metricType)) {
              newMetricName = insertTagIntoCategoty(suffix, metric.getName());
            } else {
              newMetricName = insertTagInToMetricName(suffix, metric.getName(), prefix);
            }
            org.apache.ambari.server.state.stack.Metric newMetric = new org.apache.ambari.server.state.stack.Metric(
              newMetricName,
              metric.isPointInTime(),
              metric.isTemporal(),
              metric.isAmsHostMetric(),
              metric.getUnit()
            );

            replacementMap.put(insertTagInToMetricName(suffix, propertyId, prefix), newMetric);
          }
        }
      }
    }
    return replacementMap;
  }

}