Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
HBASE-25900 Hadoop 3.2 and 3.3 support (#25)
Build on top of SteveL's original changes. Added indirection so that the correct S3ClientFactory can be included at test-time. Provides s3a.xml contracts for each version to reflect what actually works. Skips the new tests which we know would fail on the older <Hadoop3.3 releases. Co-authored-by: Steve Loughran <stevel@apache.org> Co-authored-by: Peter Somogyi <psomogyi@cloudera.com> Signed-off-by: Peter Somogyi <psomogyi@cloudera.com>
- Loading branch information
Showing
16 changed files
with
772 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,63 @@ | ||
<?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.hbase.filesystem</groupId> | ||
<artifactId>hbase-filesystem</artifactId> | ||
<version>1.0.0-alpha2-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>hadoop-testutils</artifactId> | ||
<name>Common test utilities across Hadoop versions</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
<version>${commons-lang3.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hadoop</groupId> | ||
<artifactId>hadoop-common</artifactId> | ||
<version>${hadoop.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<!-- Banned import in HBase --> | ||
<groupId>com.google.code.findbugs</groupId> | ||
<artifactId>jsr305</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hadoop</groupId> | ||
<artifactId>hadoop-aws</artifactId> | ||
<version>${hadoop.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-bundle</artifactId> | ||
<version>${aws-java-sdk.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.yetus</groupId> | ||
<artifactId>audience-annotations</artifactId> | ||
<version>${audience-annotations.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,56 @@ | ||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.hbase.filesystem</groupId> | ||
<artifactId>hbase-filesystem</artifactId> | ||
<version>1.0.0-alpha2-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<artifactId>hadoop3-2-testutils</artifactId> | ||
<name>Test utility classes for Hadoop 3.1.x and 3.2.x</name> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hbase.filesystem</groupId> | ||
<artifactId>hadoop-testutils</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hadoop</groupId> | ||
<artifactId>hadoop-aws</artifactId> | ||
<version>${hadoop.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-bundle</artifactId> | ||
<version>${aws-java-sdk.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.yetus</groupId> | ||
<artifactId>audience-annotations</artifactId> | ||
<version>${audience-annotations.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,50 @@ | ||
/** | ||
* 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 | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* 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. | ||
*/ | ||
package org.apache.hadoop.hbase.oss; | ||
|
||
import java.io.IOException; | ||
import java.net.URI; | ||
|
||
import org.apache.hadoop.fs.s3a.S3ClientFactory; | ||
import org.apache.hadoop.hbase.oss.EmbeddedS3.EmbeddedAmazonS3; | ||
|
||
import com.amazonaws.auth.AWSCredentialsProvider; | ||
import com.amazonaws.services.s3.AmazonS3; | ||
|
||
public class Hadoop32EmbeddedS3ClientFactory implements S3ClientFactory { | ||
public AmazonS3 createS3Client(URI name) { | ||
AmazonS3 s3 = new EmbeddedAmazonS3(); | ||
s3.createBucket(EmbeddedS3.BUCKET); | ||
return s3; | ||
} | ||
|
||
public AmazonS3 createS3Client(URI name, | ||
String bucket, | ||
AWSCredentialsProvider credentialSet, | ||
String userAgentSuffix) { | ||
AmazonS3 s3 = new EmbeddedAmazonS3(); | ||
s3.createBucket(bucket); | ||
return s3; | ||
} | ||
|
||
public AmazonS3 createS3Client(URI name, | ||
String bucket, | ||
AWSCredentialsProvider credentialSet) { | ||
return createS3Client(name); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,56 @@ | ||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.hbase.filesystem</groupId> | ||
<artifactId>hbase-filesystem</artifactId> | ||
<version>1.0.0-alpha2-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<artifactId>hadoop3-3-testutils</artifactId> | ||
<name>Test utility classes for Hadoop 3.3.1 and beyond</name> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hbase.filesystem</groupId> | ||
<artifactId>hadoop-testutils</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hadoop</groupId> | ||
<artifactId>hadoop-aws</artifactId> | ||
<version>${hadoop.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-bundle</artifactId> | ||
<version>${aws-java-sdk.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.yetus</groupId> | ||
<artifactId>audience-annotations</artifactId> | ||
<version>${audience-annotations.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Oops, something went wrong.