diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java b/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java index aeeebc96ef..9c7cc18b60 100644 --- a/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java +++ b/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java @@ -937,13 +937,13 @@ public void handle(DAGAppMasterEvent event) { protected class DAGAppMasterShutdownHandler { private AtomicBoolean shutdownHandled = new AtomicBoolean(false); private long sleepTimeBeforeExit = TezConstants.TEZ_DAG_SLEEP_TIME_BEFORE_EXIT; - private Date shutdownTime; + private long shutdownTime; public Date getShutdownTime() { - return shutdownTime; + return new Date(shutdownTime); } - public void setShutdownTime(Date shutdownTime) { + public void setShutdownTime(long shutdownTime) { this.shutdownTime = shutdownTime; } @@ -964,7 +964,7 @@ public void shutdown(boolean now) { synchronized (shutdownHandlerRunning) { shutdownHandlerRunning.set(true); - setShutdownTime(new Date(System.currentTimeMillis())); + setShutdownTime(System.currentTimeMillis()); } LOG.info("Handling DAGAppMaster shutdown");