hostRecvStats.put(host.getHostAddress(), "Error retrieving file data");
}
}
rootObj.put("hosts receiving", hostRecvStats);
MessagingServiceMBean ms = nodetool.msProxy;
int pending;
long completed;
pending = 0;
for (int n : ms.getCommandPendingTasks().values())
pending += n;
completed = 0;
for (long n : ms.getCommandCompletedTasks().values())
completed += n;
JSONObject cObj = new JSONObject();
cObj.put("active", "n/a");
cObj.put("pending", pending);
cObj.put("completed", completed);
rootObj.put("commands", cObj);
pending = 0;
for (int n : ms.getResponsePendingTasks().values())
pending += n;
completed = 0;
for (long n : ms.getResponseCompletedTasks().values())
completed += n;
JSONObject rObj = new JSONObject();
rObj.put("active", "n/a");
rObj.put("pending", pending);
rObj.put("completed", completed);