public String getSummaryJson() {
return getSummary().toJson();
}
InfoMap getSummary() {
final ClusterMetrics metrics = getClusterMetrics();
InfoMap map = new InfoMap();
map.put("nodes", metrics.getTaskTrackerCount()
+ getBlacklistedTrackerCount());
map.put("alive", metrics.getTaskTrackerCount());
map.put("blacklisted", getBlacklistedTrackerCount());
map.put("graylisted", getGraylistedTrackerCount());
map.put("slots", new InfoMap() {{
put("map_slots", metrics.getMapSlotCapacity());
put("map_slots_used", metrics.getOccupiedMapSlots());
put("reduce_slots", metrics.getReduceSlotCapacity());
put("reduce_slots_used", metrics.getOccupiedReduceSlots());
}});
map.put("jobs", metrics.getTotalJobSubmissions());
return map;
}