Neilxzn commented on a change in pull request #2544:
URL: https://github.com/apache/hive/pull/2544#discussion_r754177729
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
##########
@@ -4990,4 +4991,19 @@ public static boolean arePathsEqualOrWithin(Path p1,
Path p2) {
return ((p1.toString().toLowerCase().indexOf(p2.toString().toLowerCase())
> -1) ||
(p2.toString().toLowerCase().indexOf(p1.toString().toLowerCase()) >
-1)) ? true : false;
}
+
+ /**
+ * Convenience method to obtain delegation tokens
+ * corresponding to the paths passed for mapReduce job.
+ * @param job jonconf
+ * @param ps array of paths
+ */
+ public static void setToken(JobConf job, Path[] ps) {
+ try {
+ TokenCache.obtainTokensForNamenodes(job.getCredentials(),
+ ps, job);
+ } catch (IOException ex) {
+ LOG.error("Error in setToken ", ex);
Review comment:
Thank you for your review!
Agree with you and I have removed the `try catch`
--
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]