|
@@ -72,6 +72,7 @@ import org.codehaus.jackson.map.ObjectMapper;
|
|
|
import org.codehaus.jackson.node.ArrayNode;
|
|
|
import org.codehaus.jackson.node.ObjectNode;
|
|
|
|
|
|
+import com.google.common.annotations.VisibleForTesting;
|
|
|
/**
|
|
|
* The job history events get routed to this class. This class writes the Job
|
|
|
* history events to the DFS directly into a staging dir and then moved to a
|
|
@@ -1259,6 +1260,7 @@ public class JobHistoryEventHandler extends AbstractService
|
|
|
if (!isTimerShutDown) {
|
|
|
flushTimerTask = new FlushTimerTask(this);
|
|
|
flushTimer.schedule(flushTimerTask, flushTimeout);
|
|
|
+ isTimerActive = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1378,4 +1380,9 @@ public class JobHistoryEventHandler extends AbstractService
|
|
|
}
|
|
|
return JobState.KILLED.toString();
|
|
|
}
|
|
|
+
|
|
|
+ @VisibleForTesting
|
|
|
+ boolean getFlushTimerStatus() {
|
|
|
+ return isTimerActive;
|
|
|
+ }
|
|
|
}
|