private final Log log;
private final String id;
HeartBeat(final Progressable progressable, Configuration cfg, TimeValue delay, final Log log) {
Assert.notNull(progressable, "a valid progressable is required to report status to Hadoop");
TimeValue tv = HadoopCfgUtils.getTaskTimeout(cfg);
Assert.isTrue(tv.getSeconds() > delay.getSeconds(), "Hadoop timeout is shorter than the heartbeat");
this.progressable = progressable;
this.rate = new TimeValue(tv.getMillis() - delay.getMillis(), TimeUnit.MILLISECONDS);
this.log = log;
TaskID taskID = TaskID.forName(HadoopCfgUtils.getTaskId(cfg));
String taskId;
if (taskID == null) {