public static float calcPercentage(long a, long b) {
    if (a == 0 || b == 0) {
      return 0;
    }
    return ((float) a / (float) b) * 100;
  }
Method for building map used for constructing ObjectName. Mapping is done with arrays indices
@param keys   Map keys
@param values Map values
@return Map or null if arrays are empty or have different number of elements
hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONMetricUtil.java