private Number convertToNumber(String s) {
      return s.contains(".") ? Double.parseDouble(s) : Long.parseLong(s);
    }
Populate the given resource with the given Ganglia metric.

@param resource       the resource
@param gangliaMetric  the Ganglia metrics
ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaPropertyProvider.java