ayushtkn commented on code in PR #5544:
URL: https://github.com/apache/hive/pull/5544#discussion_r1855131078


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java:
##########
@@ -758,8 +759,8 @@ private DataContainer handleDynParts(Hive db, Table table, 
LoadTableDesc tbd,
       }
       LOG.info("Loading partition " + entry.getKey());
     }
-    console.printInfo("\t Time taken for adding to write entity : " +
-        (System.currentTimeMillis() - startTime)/1000.0 + " seconds");
+    console.printInfo(String.format("Time taken for adding to write entity:\t 
%.3f seconds",
+        (System.currentTimeMillis() - startTime) / 1000.0));

Review Comment:
   this entire class does this not something new, but still I will take the 
opportunity here to say. ``System.currentTimeMillis()`` isn't the best thing to 
do when calculating elaspsed time, it is subject to wall clock changes, Should 
use ``nanoTime()`` always, or Time.monotonicNow()
   
   
https://github.com/apache/hadoop/blob/31b8b4a8bd5602e04e780776acf878dacda01656/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Time.java#L49-L69



##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -5047,7 +5047,7 @@ private static void deleteAndRename(FileSystem destFs, 
Path destFile, FileStatus
     try {
       // rename cannot overwrite non empty destination directory, so deleting 
the destination before renaming.
       destFs.delete(destFile);
-      LOG.info("Deleted destination file" + destFile.toUri());
+      LOG.info("Deleted destination file: " + destFile.toUri());

Review Comment:
   Since you are touching it, can you change it to
   LOG.info("Deleted destination file: {}", destFile.toUri());



##########
ql/src/java/org/apache/hadoop/hive/ql/stats/BasicStatsTask.java:
##########
@@ -102,7 +102,6 @@ public BasicStatsTask(HiveConf conf, BasicStatsWork work) {
 
   @Override
   public int process(Hive db, Table tbl) throws Exception {
-

Review Comment:
   avoid



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to