yuqi1129 commented on code in PR #6985:
URL: https://github.com/apache/gravitino/pull/6985#discussion_r2051895486
##########
catalogs/catalog-common/src/main/java/org/apache/gravitino/credential/CredentialConstants.java:
##########
@@ -28,5 +28,8 @@ public class CredentialConstants {
public static final String OSS_TOKEN_EXPIRE_IN_SECS =
"oss-token-expire-in-secs";
public static final String ADLS_TOKEN_EXPIRE_IN_SECS =
"adls-token-expire-in-secs";
+ /** The HTTP header used to get the credential from fileset location */
+ public static final String HTTP_HEADER_CURRENT_LOCATION_NAME =
"Current-Location-Name";
Review Comment:
The name format is a bit odd.
##########
clients/filesystem-hadoop3/src/main/java/org/apache/gravitino/filesystem/hadoop/BaseGVFSOperations.java:
##########
@@ -537,6 +553,13 @@ private void setCallerContext(FilesetDataOperation
operation) {
CallerContext.CallerContextHolder.set(callerContext);
}
+ private void setCallerContextForGetCredentials(String locationName) {
+ Map<String, String> contextMap = Maps.newHashMap();
+ contextMap.put(CredentialConstants.HTTP_HEADER_CURRENT_LOCATION_NAME,
locationName);
+ CallerContext callerContext =
CallerContext.builder().withContext(contextMap).build();
Review Comment:
What if the `callContext` already existed? Will you try to override it?
--
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]