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


##########
clients/filesystem-hadoop3/src/main/java/org/apache/gravitino/filesystem/hadoop/GravitinoVirtualFileSystem.java:
##########
@@ -301,6 +301,7 @@ public long getDefaultBlockSize(Path f) {
 
   @Override
   public Token<?>[] addDelegationTokens(String renewer, Credentials 
credentials) {
+    operations.prepareDelegationTokens(workingDirectory);

Review Comment:
   Good catch, thanks. You are right: `getUri()` is always `gvfs://fileset`, so 
Hadoop hands every fileset path the same cached instance and only its first 
path was resolved.
   
   Fixed in f53918844 by adding `fs.gravitino.delegation.token.filesets`, a 
comma-separated list of GVFS paths. `prepareDelegationTokens` now resolves the 
working directory plus every listed path, so each fileset gets a token even 
with the cache enabled. Each path is resolved independently, so one 
unresolvable fileset does not block the others. Spark users set it once:
   
   ```
   
spark.hadoop.fs.gravitino.delegation.token.filesets=gvfs://fileset/c/s/fs1,gvfs://fileset/c/s/fs2
   ```
   
   Added `testResolvesTheConfiguredFilesets` and a row in `how-to-use-gvfs.md`. 
Disabling the cache (`fs.gvfs.impl.disable.cache=true`) also works, but it 
costs an extra instance and client per path, so I did not make it the 
recommended path. Let me know if you prefer a different key name.



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