adoroszlai commented on code in PR #8399:
URL: https://github.com/apache/ozone/pull/8399#discussion_r2094202180
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/util/S3StorageType.java:
##########
@@ -21,27 +21,29 @@
import org.apache.hadoop.hdds.client.ReplicationConfig;
import org.apache.hadoop.hdds.client.ReplicationFactor;
import org.apache.hadoop.hdds.client.ReplicationType;
-import org.apache.hadoop.hdds.conf.ConfigurationSource;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
-import org.apache.hadoop.ozone.OzoneConfigKeys;
/**
* Maps S3 storage class values to Ozone replication values.
*/
public enum S3StorageType {
- REDUCED_REDUNDANCY(ReplicationType.RATIS, ReplicationFactor.ONE),
- STANDARD(ReplicationType.RATIS, ReplicationFactor.THREE);
+ REDUCED_REDUNDANCY(ReplicationType.RATIS, ReplicationFactor.ONE, null),
+ STANDARD(ReplicationType.RATIS, ReplicationFactor.THREE, null),
+ STANDARD_IA(ReplicationType.EC, null, ECReplicationConfig.EcCodec.RS +
"-3-2-1024k");
private final ReplicationType type;
private final ReplicationFactor factor;
+ private final String ecReplicationString;
S3StorageType(
ReplicationType type,
- ReplicationFactor factor) {
+ ReplicationFactor factor,
+ String ecReplicationString) {
Review Comment:
Can we pass and store implementation of `ReplicationConfig`?
##########
hadoop-ozone/dist/src/main/compose/common/ec-test.sh:
##########
@@ -18,7 +18,7 @@
start_docker_env 5
## Exclude virtual-host tests. This is tested separately as it requires
additional config.
-execute_robot_test scm -v BUCKET:erasure --exclude virtual-host s3
+execute_robot_test scm -v BUCKET:erasure --exclude virtual-host --exclude
ec-storage-class s3
Review Comment:
I would like to avoid having to `--exclude` yet another test in several
scripts. We can add the new robot test file in `ec/` instead of `s3/`.
##########
hadoop-ozone/dist/src/main/smoketest/s3/awss3ecstorage.robot:
##########
@@ -0,0 +1,85 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+Documentation S3 gateway test with aws cli with STANDARD_IA storage class
+Library OperatingSystem
+Library String
+Resource ../commonlib.robot
+Resource commonawslib.robot
+Resource mpu_lib.robot
+Test Timeout 5 minutes
+Suite Setup Setup EC Multipart Tests
+Suite Teardown Teardown EC Multipart Tests
+Test Setup Generate random prefix
+Default Tags ec-storage-class
+
+*** Keywords ***
+Setup EC Multipart Tests
+ Setup s3 tests
+ Create Random File KB 1023 /tmp/1mb
+
+Teardown EC Multipart Tests
+ Remove Files /tmp/1mb
+
+*** Variables ***
+${ENDPOINT_URL} http://s3g:9878
+${BUCKET} generated
+
+*** Test Cases ***
+
+Put Object with STANDARD_IA storage class
+ ${file_checksum} = Execute md5sum /tmp/1mb | awk
'{print $1}'
+
+ ${result} = Execute AWSS3ApiCli put-object --bucket
${BUCKET} --key ${PREFIX}/ecKey32 --body /tmp/1mb --storage-class STANDARD_IA
+ ${eTag} = Execute and checkrc echo '${result}' | jq -r
'.ETag' 0
Review Comment:
`Execute and checkrc ... 0` can be simplified to `Execute ...`
https://github.com/apache/ozone/blob/211c76cd9fff7d11fb287efe8e273a161ff13a65/hadoop-ozone/dist/src/main/smoketest/lib/os.robot#L19-L22
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]