kgyrtkirk commented on a change in pull request #2544:
URL: https://github.com/apache/hive/pull/2544#discussion_r754101348



##########
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:
       I don't think any errors should be ignored here - if it will not be able 
to obtain the token; it will not work; or that's not the case?




-- 
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: gitbox-unsubscr...@hive.apache.org

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



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

Reply via email to