Skip to content

Commit

Permalink
HADOOP-18442. Remove openstack support (#4855)
Browse files Browse the repository at this point in the history
The swift:// connector for openstack support has been removed.
The hadoop-openstack jar remains, only now it is empty of code. 
This is to ensure that projects which declare the JAR a dependency
will still have successful builds.

Contributed by Steve Loughran
  • Loading branch information
steveloughran committed Oct 7, 2022
1 parent 8078130 commit c70b870
Show file tree
Hide file tree
Showing 106 changed files with 17 additions and 14,844 deletions.
5 changes: 0 additions & 5 deletions hadoop-cloud-storage-project/hadoop-cloud-storage/pom.xml
Expand Up @@ -123,11 +123,6 @@
<artifactId>hadoop-azure-datalake</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-openstack</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-cos</artifactId>
Expand Down
Expand Up @@ -379,21 +379,6 @@
<Bug code="JLM" />
</Match>

<!--
OpenStack Swift FS module -closes streams in a different method
from where they are opened.
-->
<Match>
<Class name="org.apache.hadoop.fs.swift.snative.SwiftNativeOutputStream"/>
<Method name="uploadFileAttempt"/>
<Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
</Match>
<Match>
<Class name="org.apache.hadoop.fs.swift.snative.SwiftNativeOutputStream"/>
<Method name="uploadFilePartAttempt"/>
<Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
</Match>

<!-- code from maven source, null value is checked at callee side. -->
<Match>
<Class name="org.apache.hadoop.util.ComparableVersion$ListItem" />
Expand Down
Expand Up @@ -1072,14 +1072,6 @@
</description>
</property>

<property>
<name>fs.viewfs.overload.scheme.target.swift.impl</name>
<value>org.apache.hadoop.fs.swift.snative.SwiftNativeFileSystem</value>
<description>The SwiftNativeFileSystem for view file system overload scheme
when child file system and ViewFSOverloadScheme's schemes are swift.
</description>
</property>

<property>
<name>fs.viewfs.overload.scheme.target.oss.impl</name>
<value>org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystem</value>
Expand Down Expand Up @@ -1189,12 +1181,6 @@
<description>File space usage statistics refresh interval in msec.</description>
</property>

<property>
<name>fs.swift.impl</name>
<value>org.apache.hadoop.fs.swift.snative.SwiftNativeFileSystem</value>
<description>The implementation class of the OpenStack Swift Filesystem</description>
</property>

<property>
<name>fs.automatic.close</name>
<value>true</value>
Expand Down
Expand Up @@ -852,7 +852,7 @@ Return the help for an individual command.
====================================================

The Hadoop FileSystem shell works with Object Stores such as Amazon S3,
Azure WASB and OpenStack Swift.
Azure ABFS and Google GCS.



Expand Down
Expand Up @@ -701,7 +701,7 @@ The behavior of the returned stream is covered in [Output](outputstream.html).
clients creating files with `overwrite==true` to fail if the file is created
by another client between the two tests.

* S3A, Swift and potentially other Object Stores do not currently change the `FS` state
* The S3A and potentially other Object Stores connectors not currently change the `FS` state
until the output stream `close()` operation is completed.
This is a significant difference between the behavior of object stores
and that of filesystems, as it allows &gt;1 client to create a file with `overwrite=false`,
Expand Down Expand Up @@ -1225,7 +1225,7 @@ the parent directories of the destination then exist:
There is a check for and rejection if the `parent(dest)` is a file, but
no checks for any other ancestors.

*Other Filesystems (including Swift) *
*Other Filesystems*

Other filesystems strictly reject the operation, raising a `FileNotFoundException`

Expand Down
Expand Up @@ -30,8 +30,8 @@ are places where HDFS diverges from the expected behaviour of a POSIX
filesystem.

The bundled S3A FileSystem clients make Amazon's S3 Object Store ("blobstore")
accessible through the FileSystem API. The Swift FileSystem driver provides similar
functionality for the OpenStack Swift blobstore. The Azure WASB and ADL object
accessible through the FileSystem API.
The Azure ABFS, WASB and ADL object
storage FileSystems talks to Microsoft's Azure storage. All of these
bind to object stores, which do have different behaviors, especially regarding
consistency guarantees, and atomicity of operations.
Expand Down Expand Up @@ -314,10 +314,10 @@ child entries

This specification refers to *Object Stores* in places, often using the
term *Blobstore*. Hadoop does provide FileSystem client classes for some of these
even though they violate many of the requirements. This is why, although
Hadoop can read and write data in an object store, the two which Hadoop ships
with direct support for &mdash; Amazon S3 and OpenStack Swift &mdash; cannot
be used as direct replacements for HDFS.
even though they violate many of the requirements.

Consult the documentation for a specific store to determine its compatibility
with specific applications and services.

*What is an Object Store?*

Expand Down
Expand Up @@ -66,55 +66,6 @@ Example:
</property>
</configuration>


### swift://

The OpenStack Swift login details must be defined in the file
`/hadoop-tools/hadoop-openstack/src/test/resources/contract-test-options.xml`.
The standard hadoop-common `contract-test-options.xml` resource file cannot be
used, as that file does not get included in `hadoop-common-test.jar`.


In `/hadoop-tools/hadoop-openstack/src/test/resources/contract-test-options.xml`
the Swift bucket name must be defined in the property `fs.contract.test.fs.swift`,
along with the login details for the specific Swift service provider in which the
bucket is posted.

<configuration>
<property>
<name>fs.contract.test.fs.swift</name>
<value>swift://swiftbucket.rackspace/</value>
</property>

<property>
<name>fs.swift.service.rackspace.auth.url</name>
<value>https://auth.api.rackspacecloud.com/v2.0/tokens</value>
<description>Rackspace US (multiregion)</description>
</property>

<property>
<name>fs.swift.service.rackspace.username</name>
<value>this-is-your-username</value>
</property>

<property>
<name>fs.swift.service.rackspace.region</name>
<value>DFW</value>
</property>

<property>
<name>fs.swift.service.rackspace.apikey</name>
<value>ab0bceyoursecretapikeyffef</value>
</property>

</configuration>

1. Often the different public cloud Swift infrastructures exhibit different behaviors
(authentication and throttling in particular). We recommand that testers create
accounts on as many of these providers as possible and test against each of them.
1. They can be slow, especially remotely. Remote links are also the most likely
to make eventual-consistency behaviors visible, which is a mixed benefit.

## Testing a new filesystem

The core of adding a new FileSystem to the contract tests is adding a
Expand Down Expand Up @@ -228,8 +179,6 @@ Passing all the FileSystem contract tests does not mean that a filesystem can be
* Scalability: does it support files as large as HDFS, or as many in a single directory?
* Durability: do files actually last -and how long for?

Proof that this is is true is the fact that the Amazon S3 and OpenStack Swift object stores are eventually consistent object stores with non-atomic rename and delete operations. Single threaded test cases are unlikely to see some of the concurrency issues, while consistency is very often only visible in tests that span a datacenter.

There are also some specific aspects of the use of the FileSystem API:

* Compatibility with the `hadoop -fs` CLI.
Expand Down
Expand Up @@ -139,7 +139,6 @@ public void initializeMemberVariables() {
xmlPropsToSkipCompare.add("fs.viewfs.overload.scheme.target.s3a.impl");
xmlPropsToSkipCompare.
add("fs.viewfs.overload.scheme.target.swebhdfs.impl");
xmlPropsToSkipCompare.add("fs.viewfs.overload.scheme.target.swift.impl");
xmlPropsToSkipCompare.add("fs.viewfs.overload.scheme.target.webhdfs.impl");
xmlPropsToSkipCompare.add("fs.viewfs.overload.scheme.target.wasb.impl");

Expand Down Expand Up @@ -220,8 +219,7 @@ public void initializeMemberVariables() {
xmlPropsToSkipCompare.add("hadoop.common.configuration.version");
// - org.apache.hadoop.fs.FileSystem
xmlPropsToSkipCompare.add("fs.har.impl.disable.cache");
// - org.apache.hadoop.fs.FileSystem#getFileSystemClass()
xmlPropsToSkipCompare.add("fs.swift.impl");

// - package org.apache.hadoop.tracing.TraceUtils ?
xmlPropsToSkipCompare.add("hadoop.htrace.span.receiver.classes");
// Private keys
Expand Down
1 change: 1 addition & 0 deletions hadoop-project/pom.xml
Expand Up @@ -688,6 +688,7 @@
<version>${hadoop.version}</version>
</dependency>

<!-- This is empty; retained only for downstream app build compatibility. -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-openstack</artifactId>
Expand Down
1 change: 0 additions & 1 deletion hadoop-project/src/site/site.xml
Expand Up @@ -182,7 +182,6 @@
<item name="Azure Blob Storage" href="hadoop-azure/index.html"/>
<item name="Azure Data Lake Storage"
href="hadoop-azure-datalake/index.html"/>
<item name="OpenStack Swift" href="hadoop-openstack/index.html"/>
<item name="Tencent COS" href="hadoop-cos/cloud-storage/index.html"/>
</menu>

Expand Down
4 changes: 2 additions & 2 deletions hadoop-tools/hadoop-distcp/src/site/markdown/DistCp.md.vm
Expand Up @@ -580,7 +580,7 @@ $H3 MapReduce and other side-effects

$H3 DistCp and Object Stores

DistCp works with Object Stores such as Amazon S3, Azure WASB and OpenStack Swift.
DistCp works with Object Stores such as Amazon S3, Azure ABFS and Google GCS.

Prequisites

Expand Down Expand Up @@ -623,7 +623,7 @@ And to use `-update` to only copy changed files.

```bash
hadoop distcp -update -numListstatusThreads 20 \
swift://history.cluster1/2016 \
s3a://history/2016 \
hdfs://nn1:8020/history/2016
```

Expand Down
34 changes: 0 additions & 34 deletions hadoop-tools/hadoop-openstack/dev-support/findbugs-exclude.xml

This file was deleted.

93 changes: 4 additions & 89 deletions hadoop-tools/hadoop-openstack/pom.xml
Expand Up @@ -26,9 +26,10 @@
<version>3.3.9-SNAPSHOT</version>
<name>Apache Hadoop OpenStack support</name>
<description>
This module contains code to support integration with OpenStack.
Currently this consists of a filesystem client to read data from
and write data to an OpenStack Swift object store.
This module used to contain code to support integration with OpenStack.
It has been deleted as unsupported; the JAR is still published so as to
not break applications which declare an explicit maven/ivy/SBT dependency
on the module.
</description>
<packaging>jar</packaging>

Expand All @@ -37,104 +38,18 @@
<downloadSources>true</downloadSources>
</properties>

<profiles>
<profile>
<id>tests-off</id>
<activation>
<file>
<missing>src/test/resources/auth-keys.xml</missing>
</file>
</activation>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
<profile>
<id>tests-on</id>
<activation>
<file>
<exists>src/test/resources/auth-keys.xml</exists>
</file>
</activation>
<properties>
<maven.test.skip>false</maven.test.skip>
</properties>
</profile>

</profiles>

<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
</excludeFilterFile>
<effort>Max</effort>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>deplist</id>
<phase>compile</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<!-- build a shellprofile -->
<outputFile>${project.basedir}/target/hadoop-tools-deps/${project.artifactId}.tools-optional.txt</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
</project>

0 comments on commit c70b870

Please sign in to comment.