From fa43d377edc132d017c8c6f23028e417bee80fe7 Mon Sep 17 00:00:00 2001 From: Ayush Saxena Date: Wed, 28 Aug 2024 21:25:29 +0530 Subject: [PATCH] FindBugs --- .../main/java/org/apache/tez/dag/app/DAGAppMaster.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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");