You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/07/31 17:44:50 UTC

[GitHub] [hive] HunterL commented on a change in pull request #1334: HIVE-21611: Date.getTime() can be changed to System.currentTimeMillis()

HunterL commented on a change in pull request #1334:
URL: https://github.com/apache/hive/pull/1334#discussion_r463745229



##########
File path: hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/HDFSCleanup.java
##########
@@ -134,7 +132,7 @@ public void run() {
    * @throws IOException
    */
   private void checkFiles(FileSystem fs) throws IOException {
-    long now = new Date().getTime();
+    long now = System.currentTimeMillis();

Review comment:
       This one uses the current time to compare to a files last modified time, so `System.nanoTime();` doesn't work here




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org