abstractdog commented on code in PR #4753:
URL: https://github.com/apache/hive/pull/4753#discussion_r1341915185


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java:
##########
@@ -1221,9 +1221,9 @@ private Map<String, LocalResource> 
addTempResources(Configuration conf, String h
         LOG.info("Skipping vertex resource " + file + " that already exists in 
the session");
         continue;
       }
-      Path hdfsFilePath = new Path(hdfsDirPathStr, getResourceBaseName(new 
Path(file)));
-      LocalResource localResource = localizeResource(new Path(file),
-          hdfsFilePath, type, conf);
+      Path path = FileUtils.resolveSymlinks(new Path(file), conf);

Review Comment:
   1. refactor to variable, yes 👍 
   2. null check in the util: it's for general usage, to have to user get an 
IAE or NPE somewhere in the business logic instead of a utility method, I have 
no strong opinions about this though...I can refactor the util method to throw 
an IAE in case of null and tune the unit test accordingly



##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java:
##########
@@ -1221,9 +1221,9 @@ private Map<String, LocalResource> 
addTempResources(Configuration conf, String h
         LOG.info("Skipping vertex resource " + file + " that already exists in 
the session");
         continue;
       }
-      Path hdfsFilePath = new Path(hdfsDirPathStr, getResourceBaseName(new 
Path(file)));
-      LocalResource localResource = localizeResource(new Path(file),
-          hdfsFilePath, type, conf);
+      Path path = FileUtils.resolveSymlinks(new Path(file), conf);

Review Comment:
   1. refactor to variable, yes 👍 
   2. null check in the util: it's for general usage, to have to user get an 
IAE or NPE somewhere in the business logic instead of a utility method, I have 
no strong opinions about this though...I can refactor the util method to throw 
an IAE in case of null and tune the unit test accordingly



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