Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* limitations under the License.
*/

package org.apache.hadoop.utils;
package org.apache.ozone.test;

import com.google.common.base.Preconditions;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Objects;

/**
* A filter input stream implementation that exposes a range of the underlying input stream.
Expand All @@ -33,8 +33,7 @@ public class InputSubstream extends FilterInputStream {
private long markedPosition = 0;

public InputSubstream(InputStream in, long skip, long length) {
super(in);
Preconditions.checkNotNull(in);
super(Objects.requireNonNull(in, "in == null"));
this.currentPosition = 0;
this.requestedSkipOffset = skip;
this.requestedLength = length;
Expand Down
4 changes: 2 additions & 2 deletions hadoop-ozone/dev-support/checks/_mvn_unit_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cat ${failures} > "${tempfile}"

leaks=${REPORT_DIR}/leaks.txt
if [[ "${CHECK:-unit}" == "integration" ]]; then
find hadoop-ozone/integration-test -not -path '*/iteration*' -name '*-output.txt' -print0 \
find hadoop-ozone/integration-test* -not -path '*/iteration*' -name '*-output.txt' -print0 \
| xargs -n1 -0 "grep" -l -E "not closed properly|was not shutdown properly" \
| awk -F/ '{sub("-output.txt",""); print $NF}' \
> "${leaks}"
Expand All @@ -47,7 +47,7 @@ fi

cluster=${REPORT_DIR}/cluster-startup-errors.txt
if [[ "${CHECK:-unit}" == "integration" ]]; then
find hadoop-ozone/integration-test -not -path '*/iteration*' -name '*-output.txt' -print0 \
find hadoop-ozone/integration-test* -not -path '*/iteration*' -name '*-output.txt' -print0 \
| xargs -n1 -0 "grep" -l -E "Unable to build MiniOzoneCluster" \
| awk -F/ '{sub("-output.txt",""); print $NF}' \
> "${cluster}"
Expand Down
2 changes: 1 addition & 1 deletion hadoop-ozone/dev-support/checks/unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
CHECK=unit
source "${DIR}/junit.sh" \
-pl \!:ozone-integration-test,\!:mini-chaos-tests \
-pl \!:ozone-integration-test,\!:ozone-integration-test-s3,\!:mini-chaos-tests \
"$@"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed 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. See accompanying LICENSE file.
-->
<FindBugsFilter>
</FindBugsFilter>
121 changes: 121 additions & 0 deletions hadoop-ozone/integration-test-s3/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed 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. See accompanying LICENSE file.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.ozone</groupId>
<artifactId>ozone</artifactId>
<version>2.1.0-SNAPSHOT</version>
</parent>
<artifactId>ozone-integration-test-s3</artifactId>
<version>2.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Apache Ozone S3 Integration Tests</name>
<description>Apache Ozone Integration Tests with S3 Gateway</description>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-config</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-server-framework</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-test-utils</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>ozone-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>ozone-mini-cluster</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>ozone-s3gateway</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ratis</groupId>
<artifactId>ratis-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<proc>none</proc>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.io.RandomAccessFile;
import java.security.MessageDigest;
import org.apache.commons.lang3.RandomUtils;
import org.apache.hadoop.utils.InputSubstream;
import org.apache.ozone.test.InputSubstream;

/**
* Utilities for S3 SDK tests.
Expand Down
126 changes: 126 additions & 0 deletions hadoop-ozone/integration-test-s3/src/test/resources/ozone-site.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
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.
-->

<!-- Put site-specific property overrides in this file. -->

<configuration>

<property>
<name>ozone.om.transport.class</name>
<value>org.apache.hadoop.ozone.om.protocolPB.Hadoop3OmTransportFactory</value>
</property>

<property>
<name>ozone.om.s3.grpc.server_enabled</name>
<value>false</value>
</property>

<property>
<name>hdds.container.ratis.num.write.chunk.threads.per.volume</name>
<value>4</value>
</property>

<property>
<name>ozone.scm.handler.count.key</name>
<value>20</value>
</property>

<property>
<name>ozone.om.handler.count.key</name>
<value>20</value>
</property>

<property>
<name>hdds.container.ratis.datastream.enabled</name>
<value>true</value>
</property>


<property>
<name>hdds.heartbeat.interval</name>
<value>1s</value>
</property>
<property>
<name>ozone.scm.heartbeat.thread.interval</name>
<value>100ms</value>
</property>

<property>
<name>ozone.scm.ratis.pipeline.limit</name>
<value>3</value>
</property>

<property>
<name>ozone.scm.close.container.wait.duration</name>
<value>1s</value>
</property>

<property>
<name>ozone.om.snapshot.diff.job.default.wait.time</name>
<value>1s</value>
</property>

<property>
<name>hdds.container.ratis.log.appender.queue.byte-limit
</name>
<value>32MB</value>
</property>
<property>
<name>ozone.om.ratis.log.appender.queue.byte-limit</name>
<value>4MB</value>
</property>
<property>
<name>ozone.scm.ha.ratis.log.appender.queue.byte-limit</name>
<value>4MB</value>
</property>

<property>
<name>ozone.scm.chunk.size</name>
<value>1MB</value>
</property>
<property>
<name>ozone.scm.block.size</name>
<value>4MB</value>
</property>
<property>
<name>ozone.client.stream.buffer.flush.size</name>
<value>1MB</value>
</property>
<property>
<name>ozone.client.stream.buffer.max.size</name>
<value>2MB</value>
</property>
<property>
<name>ozone.client.stream.buffer.size</name>
<value>1MB</value>
</property>
<property>
<name>ozone.client.datastream.buffer.flush.size</name>
<value>4MB</value>
</property>
<property>
<name>ozone.client.datastream.min.packet.size</name>
<value>256KB</value>
</property>
<property>
<name>ozone.client.datastream.window.size</name>
<value>8MB</value>
</property>

</configuration>
5 changes: 0 additions & 5 deletions hadoop-ozone/integration-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,6 @@
<artifactId>ozone-mini-cluster</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
7 changes: 7 additions & 0 deletions hadoop-ozone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<module>httpfsgateway</module>
<module>insight</module>
<module>integration-test</module>
<module>integration-test-s3</module>
<module>interface-client</module>
<module>interface-storage</module>
<module>mini-cluster</module>
Expand Down Expand Up @@ -147,6 +148,12 @@
<artifactId>hdds-server-framework</artifactId>
<version>${hdds.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-server-framework</artifactId>
<version>${hdds.version}</version>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-server-scm</artifactId>
Expand Down