diff --git a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/HDFSCleanup.java b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/HDFSCleanup.java index e3fd176..13b22e8 100644 --- a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/HDFSCleanup.java +++ b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/HDFSCleanup.java @@ -134,7 +134,7 @@ public void run() { * @throws IOException */ private void checkFiles(FileSystem fs) throws IOException { - long now = new Date().getTime(); + long now = System.currentTimeMillis(); for (Type type : Type.values()) { try { for (FileStatus status : fs.listStatus(new Path( diff --git a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/ZooKeeperCleanup.java b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/ZooKeeperCleanup.java index 4ebc34b..3df7259 100644 --- a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/ZooKeeperCleanup.java +++ b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/ZooKeeperCleanup.java @@ -150,7 +150,7 @@ public boolean checkAndDelete(String node, CuratorFramework zk) { JobStateTracker tracker = new JobStateTracker(node, zk, true, appConf.get(TempletonStorage.STORAGE_ROOT + ZooKeeperStorage.TRACKINGDIR)); - long now = new Date().getTime(); + long now = System.currentTimeMillis(); state = new JobState(tracker.getJobID(), appConf); // Set the default to 0 -- if the created date is null, there was