FANNG1 commented on code in PR #5974:
URL: https://github.com/apache/gravitino/pull/5974#discussion_r1907211439
##########
clients/filesystem-hadoop3/src/main/java/org/apache/gravitino/filesystem/hadoop/GravitinoVirtualFileSystem.java:
##########
@@ -410,6 +336,23 @@ private FilesetContextPair getFilesetContext(Path
virtualPath, FilesetDataOperat
return new FilesetContextPair(new Path(actualFileLocation), fs);
}
+ private boolean credentialVending(Catalog catalog, NameIdentifier
filesetIdentifier) {
+ try {
+ Fileset fileset =
+ catalog
+ .asFilesetCatalog()
+ .loadFileset(
+ NameIdentifier.of(
+ filesetIdentifier.namespace().level(2),
filesetIdentifier.name()));
+ Credential[] credentials =
fileset.supportsCredentials().getCredentials();
+ return credentials.length > 0;
+ } catch (Exception e) {
+ // No credential found, do nothing.
Review Comment:
This should throw the exception not eat it. if the fileset doesn't support
credential vending, it will return an empty credentials.
--
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]