ivandika3 commented on code in PR #6458:
URL: https://github.com/apache/ozone/pull/6458#discussion_r1557471737


##########
hadoop-ozone/dist/src/main/compose/common/s3a-test.sh:
##########
@@ -0,0 +1,115 @@
+#!/usr/bin/env bash
+# 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.
+
+# This script runs S3A contract tests against various bucket types on
+# a Docker Compose-based Ozone cluster.
+# Requires HADOOP_AWS_DIR to point the directory containing hadoop-aws sources.
+
+if [[ -z ${HADOOP_AWS_DIR} ]] || [[ ! -e ${HADOOP_AWS_DIR} ]]; then
+  echo "Set HADOOP_AWS_DIR to the directory with hadoop-aws sources" >&2
+  exit 1
+fi
+
+# shellcheck source=/dev/null
+source "$COMPOSE_DIR/../testlib.sh"
+
+## @description Run S3A contract tests against Ozone.
+## @param       Ozone S3 bucket
+execute_s3a_tests() {
+  local bucket="$1"
+
+  pushd "${HADOOP_AWS_DIR}"
+
+  # S3A contract tests are enabled by presence of `auth-keys.xml`.
+  # 
https://hadoop.apache.org/docs/3.3.6/hadoop-aws/tools/hadoop-aws/testing.html#Setting_up_the_tests

Review Comment:
   Nit: I can't seem to access this link. 
   
   Do you mean r3.3.6 instead of 3.3.36? (i.e. 
https://hadoop.apache.org/docs/r3.3.6/hadoop-aws/tools/hadoop-aws/testing.html#Setting_up_the_tests)



##########
hadoop-ozone/dist/src/main/compose/common/s3a-test.sh:
##########
@@ -0,0 +1,115 @@
+#!/usr/bin/env bash
+# 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.
+
+# This script runs S3A contract tests against various bucket types on
+# a Docker Compose-based Ozone cluster.
+# Requires HADOOP_AWS_DIR to point the directory containing hadoop-aws sources.
+
+if [[ -z ${HADOOP_AWS_DIR} ]] || [[ ! -e ${HADOOP_AWS_DIR} ]]; then
+  echo "Set HADOOP_AWS_DIR to the directory with hadoop-aws sources" >&2
+  exit 1
+fi
+
+# shellcheck source=/dev/null
+source "$COMPOSE_DIR/../testlib.sh"
+
+## @description Run S3A contract tests against Ozone.
+## @param       Ozone S3 bucket
+execute_s3a_tests() {
+  local bucket="$1"
+
+  pushd "${HADOOP_AWS_DIR}"
+
+  # S3A contract tests are enabled by presence of `auth-keys.xml`.
+  # 
https://hadoop.apache.org/docs/3.3.6/hadoop-aws/tools/hadoop-aws/testing.html#Setting_up_the_tests
+  cat > src/test/resources/auth-keys.xml <<-EOF
+  <configuration>
+
+    <property>
+      <name>fs.s3a.endpoint</name>
+      <value>http://localhost:9878</value>
+    </property>
+
+    <property>
+      <name>test.fs.s3a.endpoint</name>
+      <value>http://localhost:9878</value>
+    </property>
+
+    <property>
+      <name>fs.contract.test.fs.s3a</name>
+      <value>s3a://${bucket}/</value>
+    </property>
+
+    <property>
+      <name>test.fs.s3a.name</name>
+      <value>s3a://${bucket}/</value>
+    </property>
+
+    <property>
+      <name>test.fs.s3a.sts.enabled</name>
+      <value>false</value>
+    </property>
+
+    <property>
+      <name>fs.s3a.path.style.access</name>
+      <value>true</value>
+    </property>

Review Comment:
   It might be nice to also test for virtual host style pattern to uncover some 
AWS Java SDK problems with it (e.g. HDDS-7035) since our S3G implementation is 
built on top of path style pattern assumption (i.e. S3G uses 
`VirtualHostStyleFilter` to convert virtual host style -> path style).
   
   This can be addressed in future patches if needed.



-- 
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]

Reply via email to