Integer currtime = TimeUtils.current_time_secs();
for (Entry<Integer, TaskStats> entry : taskStatsMap.entrySet()) {
Integer taskId = entry.getKey();
CommonStatsRolling taskStats = entry.getValue().getTaskStat();
String idStr = " " + topology_id + ":" + taskId + " ";
try {
TaskHeartbeat hb = new TaskHeartbeat(currtime, uptime.uptime(),
taskStats.render_stats(), entry.getValue().getComponentType());
zkCluster.task_heartbeat(topology_id, taskId, hb);
} catch (Exception e) {
// TODO Auto-generated catch block
String errMsg = "Failed to update heartbeat to ZK " + idStr
+ "\n";