public Map<String, Map<String, Object>> getMetrics() throws IOException {
    String jsonString = getEntityAsJson("/metrics", "metrics");
    return jsonMapper.readValue(jsonString, new TypeReference<Map<String, Map<String, Object>>>() { });
  }
@return  the metrics as a map of groupName to metricName to metricValue.
@throws IOException if there was an error fetching the metrics from the servlet.
samza-yarn/src/main/java/org/apache/samza/webapp/ApplicationMasterRestClient.java