pithecuse527 commented on code in PR #13455:
URL: https://github.com/apache/gravitino/pull/13455#discussion_r4078323998


##########
clients/filesystem-hadoop3/src/main/java/org/apache/gravitino/filesystem/hadoop/BaseGVFSOperations.java:
##########
@@ -449,6 +449,30 @@ public abstract FSDataOutputStream append(Path gvfsPath, 
int bufferSize, Progres
    */
   public abstract Token<?>[] addDelegationTokens(String renewer, Credentials 
credentials);
 
+  /**
+   * Resolve the given fileset path so that its actual file system is created 
before delegation
+   * tokens are collected.
+   *
+   * <p>Delegation tokens are collected by iterating the file system cache, 
which is only populated
+   * when a file is actually accessed. A token consumer such as Spark collects 
tokens before the job
+   * is submitted, when nothing has been accessed yet, so without this step no 
token is returned and
+   * executors fail to reach a fileset that lives outside the default file 
system.
+   *
+   * @param filesetPath the virtual path this file system was initialized with.
+   */
+  public void prepareDelegationTokens(Path filesetPath) {
+    if (!fileSystemCache.asMap().isEmpty()) {
+      return;
+    }

Review Comment:
   resolved



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

Reply via email to