Skip to content

Commit

Permalink
OAK-11266: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
t-rana committed Dec 11, 2024
1 parent f0a5039 commit 426f5fb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,12 @@ public void setProperties(Properties properties) {

private void setRemoteStorageMode() {
String s3EndPoint = properties.getProperty(S3Constants.S3_END_POINT, "");
if (s3EndPoint.contains("https://storage.googleapis.com")) {
properties.putIfAbsent(S3Constants.MODE, RemoteStorageMode.GCP);
if (s3EndPoint.contains("googleapis")) {
properties.put(S3Constants.MODE, RemoteStorageMode.GCP);
return;
}
// default mode is S3
properties.putIfAbsent(S3Constants.MODE, RemoteStorageMode.S3);
properties.put(S3Constants.MODE, RemoteStorageMode.S3);
}

@Override
Expand Down Expand Up @@ -1361,4 +1361,12 @@ public KeyRenameThread(String oldKey) {
this.oldKey = oldKey;
}
}

/**
* Enum to indicate remote storage mode
*/
private enum RemoteStorageMode {
S3,
GCP
}
}

0 comments on commit 426f5fb

Please sign in to comment.