>From Murtadha Hubail <[email protected]>: Murtadha Hubail has submitted this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17529 )
Change subject: [NO ISSUE][OTH] Fix bucket name in S3Mock ...................................................................... [NO ISSUE][OTH] Fix bucket name in S3Mock - user model changes: no - storage format changes: no - interface changes: yes Details: - Fixed the bucket name in S3Mock to match the bucket name used in the mock cloud storage config. - Remove unused partitions count from ICloudStorageConfiguration. Change-Id: I16e3c8b16ccab843ff4737bc9cc4df488277045d Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17529 Integration-Tests: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Reviewed-by: Hussain Towaileb <[email protected]> --- M asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/ICloudStorageConfiguration.java M asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/MockCloudStorageConfiguration.java M asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/FileCloudStorageConfiguration.java M asterixdb/asterix-app/src/test/java/org/apache/asterix/api/common/CloudUtils.java 4 files changed, 25 insertions(+), 19 deletions(-) Approvals: Hussain Towaileb: Looks good to me, approved Jenkins: Verified; Verified Objections: Anon. E. Moose #1000171: Violations found diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/common/CloudUtils.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/common/CloudUtils.java index 5f13e0b..293a580 100644 --- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/common/CloudUtils.java +++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/common/CloudUtils.java @@ -20,6 +20,7 @@ import java.net.URI; +import org.apache.asterix.cloud.storage.MockCloudStorageConfiguration; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -36,7 +37,7 @@ private static final int MOCK_SERVER_PORT = 8001; private static final String MOCK_SERVER_HOSTNAME = "http://127.0.0.1:" + MOCK_SERVER_PORT; - private static final String CLOUD_STORAGE_BUCKET = "cloud-storage-bucket"; + private static final String CLOUD_STORAGE_BUCKET = MockCloudStorageConfiguration.INSTANCE.getContainer(); private static final String MOCK_SERVER_REGION = "us-west-2"; private static S3Mock s3MockServer; diff --git a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/FileCloudStorageConfiguration.java b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/FileCloudStorageConfiguration.java index 7cee20a..ef75bba 100644 --- a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/FileCloudStorageConfiguration.java +++ b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/FileCloudStorageConfiguration.java @@ -28,7 +28,6 @@ public class FileCloudStorageConfiguration implements ICloudStorageConfiguration { private final String containerName; - private final int storagePartitionsCount; public FileCloudStorageConfiguration(File file) throws HyracksDataException { if (!file.exists()) { @@ -38,7 +37,6 @@ try { List<String> lines = FileUtils.readLines(file, "UTF-8"); this.containerName = lines.get(0); - this.storagePartitionsCount = Integer.parseInt(lines.get(1)); } catch (IOException ex) { throw HyracksDataException.create(ex); } @@ -48,9 +46,4 @@ public String getContainer() { return containerName; } - - @Override - public int getPartitionsCount() { - return storagePartitionsCount; - } } diff --git a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/ICloudStorageConfiguration.java b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/ICloudStorageConfiguration.java index e140c7c..356b2ef 100644 --- a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/ICloudStorageConfiguration.java +++ b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/ICloudStorageConfiguration.java @@ -29,9 +29,4 @@ * @return returns the container name used for the storage */ String getContainer(); - - /** - * @return returns the number of storage partitions - */ - int getPartitionsCount(); } diff --git a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/MockCloudStorageConfiguration.java b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/MockCloudStorageConfiguration.java index cf4f46f..1483739 100644 --- a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/MockCloudStorageConfiguration.java +++ b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/storage/MockCloudStorageConfiguration.java @@ -21,7 +21,6 @@ public class MockCloudStorageConfiguration implements ICloudStorageConfiguration { private static final String CONTAINER_NAME = "cloud-storage-container"; - private static final int NUMBER_OF_STORAGE_PARTITIONS = 8; public static MockCloudStorageConfiguration INSTANCE = new MockCloudStorageConfiguration(); @@ -33,9 +32,4 @@ public String getContainer() { return CONTAINER_NAME; } - - @Override - public int getPartitionsCount() { - return NUMBER_OF_STORAGE_PARTITIONS; - } } -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17529 To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Change-Id: I16e3c8b16ccab843ff4737bc9cc4df488277045d Gerrit-Change-Number: 17529 Gerrit-PatchSet: 2 Gerrit-Owner: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Hussain Towaileb <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-MessageType: merged
