Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuqi1129 committed Jan 10, 2025
1 parent da98dcf commit 41c6dfe
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public FileSystem getFileSystem(@Nonnull Path path, @Nonnull Map<String, String>

@Override
public Map<String, String> getFileSystemCredentialConf(Credential[] credentials) {
Credential credential = AzureStorageUtils.getSuitableCredential(credentials);
Credential credential = AzureStorageUtils.getAzureStorageTokenCredential(credentials);
Map<String, String> result = Maps.newHashMap();
if (credential instanceof ADLSTokenCredential) {
ADLSTokenCredential adlsTokenCredential = (ADLSTokenCredential) credential;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public String getSASToken(String account, String fileSystem, String path, String

private void refresh() {
Credential[] gravitinoCredentials = gravitinoFileSystemCredentialsProvider.getCredentials();
Credential credential = AzureStorageUtils.getSuitableCredential(gravitinoCredentials);
Credential credential = AzureStorageUtils.getAzureStorageTokenCredential(gravitinoCredentials);
if (credential == null) {
throw new RuntimeException("No suitable credential for OSS found...");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class AzureStorageUtils {
* @param credentials The credential array.
* @return A credential. Null if not found.
*/
static Credential getSuitableCredential(Credential[] credentials) {
static Credential getAzureStorageTokenCredential(Credential[] credentials) {
// Use dynamic credential if found.
for (Credential credential : credentials) {
if (credential instanceof ADLSTokenCredential) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public AccessToken getAccessToken() {
public void refresh() throws IOException {
Credential[] gravitinoCredentials = gravitinoFileSystemCredentialsProvider.getCredentials();

Credential credential = GCSUtils.getSuitableCredential(gravitinoCredentials);
Credential credential = GCSUtils.getGCSTokenCredential(gravitinoCredentials);
if (credential == null) {
throw new RuntimeException("No suitable credential for OSS found...");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public FileSystem getFileSystem(Path path, Map<String, String> config) throws IO

@Override
public Map<String, String> getFileSystemCredentialConf(Credential[] credentials) {
Credential credential = GCSUtils.getSuitableCredential(credentials);
Credential credential = GCSUtils.getGCSTokenCredential(credentials);
Map<String, String> result = Maps.newHashMap();
if (credential instanceof GCSTokenCredential) {
result.put(GCS_TOKEN_PROVIDER_IMPL, GCSCredentialsProvider.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class GCSUtils {
* @param credentials The credential array.
* @return An credential.
*/
static Credential getSuitableCredential(Credential[] credentials) {
static Credential getGCSTokenCredential(Credential[] credentials) {
for (Credential credential : credentials) {
if (credential instanceof GCSTokenCredential) {
return credential;
Expand Down

0 comments on commit 41c6dfe

Please sign in to comment.