orenccl commented on issue #5648:
URL: https://github.com/apache/gravitino/issues/5648#issuecomment-2496110660
Currently, the only solution I can think of is to pass `WRITE_DATA_LOCATION`
and `WRITE_METADATA_LOCATION` when injecting CredentialConfig.
```diff
CredentialUtils.vendCredential(
- credentialProvider,
loadTableResponse.tableMetadata().location());
+ credentialProvider,
+ new String[] {
+ loadTableResponse.tableMetadata().location(),
+
loadTableResponse.tableMetadata().property(TableProperties.WRITE_DATA_LOCATION,
""),
+
loadTableResponse.tableMetadata().property(TableProperties.WRITE_METADATA_LOCATION,
"")
+ });
```
```diff
- public static Credential vendCredential(CredentialProvider
credentialProvider, String path) {
+ public static Credential vendCredential(CredentialProvider
credentialProvider, String[] path) {
PathBasedCredentialContext pathBasedCredentialContext =
new PathBasedCredentialContext(
- PrincipalUtils.getCurrentUserName(), ImmutableSet.of(path),
ImmutableSet.of());
+ PrincipalUtils.getCurrentUserName(), ImmutableSet.copyOf(path),
ImmutableSet.of());
return credentialProvider.getCredential(pathBasedCredentialContext);
}
```
However, I'm not sure what to do next—how to test it or what will be
affected by these changes.
Could you give me some hints?
--
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]