You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2020/10/15 15:54:23 UTC

[GitHub] [incubator-gobblin] sandy143651 commented on a change in pull request #3125: [GOBBLIN-1286] Added support to fetch multiple DFS tokens for HDFS federation

sandy143651 commented on a change in pull request #3125:
URL: https://github.com/apache/incubator-gobblin/pull/3125#discussion_r505655278



##########
File path: gobblin-utility/src/main/java/org/apache/gobblin/util/hadoop/TokenUtils.java
##########
@@ -321,17 +321,15 @@ private static void getFsAndJtTokensImpl(final State state, final Configuration
   private static void getHdfsToken(Configuration conf, Credentials cred) throws IOException {
     FileSystem fs = FileSystem.get(conf);
     LOG.info("Getting DFS token from " + fs.getUri());
-    Token<?> fsToken = fs.getDelegationToken(getMRTokenRenewerInternal(new JobConf()).toString());
-    if (fsToken == null) {
-      LOG.error("Failed to fetch DFS token for ");
-      throw new IOException("Failed to fetch DFS token.");
+    String renewer = getMRTokenRenewerInternal(new JobConf()).toString();
+    Token<?>[] fsTokens = fs.addDelegationTokens(renewer, cred);
+    for(int i = 0; i< fsTokens.length; i++) {

Review comment:
       done




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