hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1526848 [1/8] - in /hadoop/common/branches/branch-2: hadoop-project/ hadoop-tools/ hadoop-tools/hadoop-openstack/ hadoop-tools/hadoop-openstack/src/ hadoop-tools/hadoop-openstack/src/main/ hadoop-tools/hadoop-openstack/src/main/java/ hadoo...
Date Fri, 27 Sep 2013 11:12:45 GMT
Author: stevel
Date: Fri Sep 27 11:12:42 2013
New Revision: 1526848

URL: http://svn.apache.org/r1526848
Log:
HADOOP-8545. Filesystem Implementation for OpenStack Swift

Added:
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/pom.xml
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/ApiKeyAuthenticationRequest.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/ApiKeyCredentials.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationRequest.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationRequestWrapper.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationResponse.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationWrapper.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/KeyStoneAuthRequest.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/KeystoneApiKeyCredentials.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/PasswordAuthenticationRequest.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/PasswordCredentials.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/Roles.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/AccessToken.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Catalog.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Endpoint.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Tenant.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/User.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftAuthenticationFailedException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftBadRequestException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConfigurationException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConnectionClosedException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConnectionException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftInternalStateException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftInvalidResponseException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftJsonMarshallingException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftNotDirectoryException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftOperationFailedException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftPathExistsException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftThrottledRequestException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftUnsupportedFeatureException.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/CopyMethod.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/ExceptionDiags.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/HttpBodyContent.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/HttpInputStreamWithRelease.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/RestClientBindings.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftProtocolConstants.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/package.html
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/StrictBufferedFSInputStream.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftFileStatus.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystem.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystemStore.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeInputStream.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeOutputStream.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftObjectFileStatus.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/Duration.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/DurationStats.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/DurationStatsTable.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/JSONUtil.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftObjectPath.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftTestUtils.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/util/SwiftUtils.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/site/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/site/apt/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/site/apt/index.apt.vm
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/site/site.xml
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/AcceptAllFilter.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/SwiftFileSystemBaseTest.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/SwiftTestConstants.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestFSMainOperationsSwift.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestLogResources.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestReadPastBuffer.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSeek.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftConfig.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemBasicOps.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemBlockLocation.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemBlocksize.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemConcurrency.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemContract.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemDelete.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemDirectories.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemExtendedContract.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemLsOperations.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemPartitionedUploads.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemRead.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemRename.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/TestSwiftObjectPath.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/hdfs2/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/hdfs2/TestSwiftFileSystemDirectoriesHdfs2.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/hdfs2/TestV2LsOperations.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/http/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/http/TestRestClientBindings.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/http/TestSwiftRestClient.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/scale/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/scale/SwiftScaleTestBase.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/scale/TestWriteManySmallFiles.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/resources/
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/resources/core-site.xml
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/test/resources/log4j.properties
Modified:
    hadoop/common/branches/branch-2/hadoop-project/pom.xml
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-tools-dist/pom.xml
    hadoop/common/branches/branch-2/hadoop-tools/pom.xml

Modified: hadoop/common/branches/branch-2/hadoop-project/pom.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-project/pom.xml?rev=1526848&r1=1526847&r2=1526848&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-project/pom.xml (original)
+++ hadoop/common/branches/branch-2/hadoop-project/pom.xml Fri Sep 27 11:12:42 2013
@@ -306,6 +306,12 @@
       </dependency>
 
       <dependency>
+        <groupId>org.apache.hadoop</groupId>
+        <artifactId>hadoop-openstack</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+
+      <dependency>
         <groupId>com.google.guava</groupId>
         <artifactId>guava</artifactId>
         <version>11.0.2</version>
@@ -336,6 +342,11 @@
         <version>3.1</version>
       </dependency>
       <dependency>
+        <groupId>org.apache.httpcomponents</groupId>
+        <artifactId>httpclient</artifactId>
+        <version>4.2.5</version>
+      </dependency>
+      <dependency>
         <groupId>commons-codec</groupId>
         <artifactId>commons-codec</artifactId>
         <version>1.4</version>

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/pom.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/pom.xml?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/pom.xml (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/pom.xml Fri Sep 27 11:12:42 2013
@@ -0,0 +1,153 @@
+<?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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.hadoop</groupId>
+    <artifactId>hadoop-project</artifactId>
+    <version>3.0.0-SNAPSHOT</version>
+    <relativePath>../../hadoop-project</relativePath>
+  </parent>
+  <artifactId>hadoop-openstack</artifactId>
+  <version>3.0.0-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.
+  </description>
+  <packaging>jar</packaging>
+
+  <properties>
+    <file.encoding>UTF-8</file.encoding>
+    <downloadSources>true</downloadSources>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </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>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven.doxia</groupId>
+            <artifactId>doxia-module-markdown</artifactId>
+            <version>1.3</version>
+          </dependency>
+        </dependencies>
+        <configuration>
+          <inputEncoding>UTF-8</inputEncoding>
+          <outputEncoding>UTF-8</outputEncoding>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+
+        <configuration>
+          <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
+          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+        </configuration>
+      </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>compile</scope>
+      <type>test-jar</type>
+    </dependency>
+
+    <dependency>
+      <groupId>org.codehaus.jackson</groupId>
+      <artifactId>jackson-mapper-asl</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.jackson</groupId>
+      <artifactId>jackson-core-asl</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <scope>compile</scope>
+    </dependency>
+
+    <!-- Used for loading test resources and converting a File to byte[] -->
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <scope>compile</scope>
+    </dependency>
+
+    <!-- Used for mocking dependencies -->
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <version>1.8.5</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/ApiKeyAuthenticationRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/ApiKeyAuthenticationRequest.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/ApiKeyAuthenticationRequest.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/ApiKeyAuthenticationRequest.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+/**
+ * Class that represents authentication request to Openstack Keystone.
+ * Contains basic authentication information.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS
+ */
+public class ApiKeyAuthenticationRequest extends AuthenticationRequest {
+  /**
+   * Credentials for login
+   */
+  private ApiKeyCredentials apiKeyCredentials;
+
+  /**
+   * API key auth
+   * @param tenantName tenant
+   * @param apiKeyCredentials credentials
+   */
+  public ApiKeyAuthenticationRequest(String tenantName, ApiKeyCredentials apiKeyCredentials) {
+    this.tenantName = tenantName;
+    this.apiKeyCredentials = apiKeyCredentials;
+  }
+
+  /**
+   * @return credentials for login into Keystone
+   */
+  @JsonProperty("RAX-KSKEY:apiKeyCredentials")
+  public ApiKeyCredentials getApiKeyCredentials() {
+    return apiKeyCredentials;
+  }
+
+  /**
+   * @param apiKeyCredentials credentials for login into Keystone
+   */
+  public void setApiKeyCredentials(ApiKeyCredentials apiKeyCredentials) {
+    this.apiKeyCredentials = apiKeyCredentials;
+  }
+
+  @Override
+  public String toString() {
+    return "Auth as " +
+           "tenant '" + tenantName + "' "
+           + apiKeyCredentials;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/ApiKeyCredentials.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/ApiKeyCredentials.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/ApiKeyCredentials.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/ApiKeyCredentials.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+
+/**
+ * Describes credentials to log in Swift using Keystone authentication.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+public class ApiKeyCredentials {
+  /**
+   * user login
+   */
+  private String username;
+
+  /**
+   * user password
+   */
+  private String apikey;
+
+  /**
+   * default constructor
+   */
+  public ApiKeyCredentials() {
+  }
+
+  /**
+   * @param username user login
+   * @param apikey user api key
+   */
+  public ApiKeyCredentials(String username, String apikey) {
+    this.username = username;
+    this.apikey = apikey;
+  }
+
+  /**
+   * @return user api key
+   */
+  public String getApiKey() {
+    return apikey;
+  }
+
+  /**
+   * @param apikey user api key
+   */
+  public void setApiKey(String apikey) {
+    this.apikey = apikey;
+  }
+
+  /**
+   * @return login
+   */
+  public String getUsername() {
+    return username;
+  }
+
+  /**
+   * @param username login
+   */
+  public void setUsername(String username) {
+    this.username = username;
+  }
+
+  @Override
+  public String toString() {
+    return "user " +
+           "'" + username + '\'' +
+           " with key of length " + ((apikey == null) ? 0 : apikey.length());
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationRequest.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationRequest.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationRequest.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+/**
+ * Class that represents authentication request to Openstack Keystone.
+ * Contains basic authentication information.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+public class AuthenticationRequest {
+
+  /**
+   * tenant name
+   */
+  protected String tenantName;
+
+  public AuthenticationRequest() {
+  }
+
+  /**
+   * @return tenant name for Keystone authorization
+   */
+  public String getTenantName() {
+    return tenantName;
+  }
+
+  /**
+   * @param tenantName tenant name for authorization
+   */
+  public void setTenantName(String tenantName) {
+    this.tenantName = tenantName;
+  }
+
+  @Override
+  public String toString() {
+    return "AuthenticationRequest{" +
+           "tenantName='" + tenantName + '\'' +
+           '}';
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationRequestWrapper.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationRequestWrapper.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationRequestWrapper.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationRequestWrapper.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,59 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+/**
+ * This class is used for correct hierarchy mapping of
+ * Keystone authentication model and java code.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+public class AuthenticationRequestWrapper {
+  /**
+   * authentication request
+   */
+  private AuthenticationRequest auth;
+
+  /**
+   * default constructor used for json parsing
+   */
+  public AuthenticationRequestWrapper() {
+  }
+
+  /**
+   * @param auth authentication requests
+   */
+  public AuthenticationRequestWrapper(AuthenticationRequest auth) {
+    this.auth = auth;
+  }
+
+  /**
+   * @return authentication request
+   */
+  public AuthenticationRequest getAuth() {
+    return auth;
+  }
+
+  /**
+   * @param auth authentication request
+   */
+  public void setAuth(AuthenticationRequest auth) {
+    this.auth = auth;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationResponse.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationResponse.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationResponse.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,69 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+import org.apache.hadoop.fs.swift.auth.entities.AccessToken;
+import org.apache.hadoop.fs.swift.auth.entities.Catalog;
+import org.apache.hadoop.fs.swift.auth.entities.User;
+
+import java.util.List;
+
+/**
+ * Response from KeyStone deserialized into AuthenticationResponse class.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+public class AuthenticationResponse {
+  private Object metadata;
+  private List<Catalog> serviceCatalog;
+  private User user;
+  private AccessToken token;
+
+  public Object getMetadata() {
+    return metadata;
+  }
+
+  public void setMetadata(Object metadata) {
+    this.metadata = metadata;
+  }
+
+  public List<Catalog> getServiceCatalog() {
+    return serviceCatalog;
+  }
+
+  public void setServiceCatalog(List<Catalog> serviceCatalog) {
+    this.serviceCatalog = serviceCatalog;
+  }
+
+  public User getUser() {
+    return user;
+  }
+
+  public void setUser(User user) {
+    this.user = user;
+  }
+
+  public AccessToken getToken() {
+    return token;
+  }
+
+  public void setToken(AccessToken token) {
+    this.token = token;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationWrapper.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationWrapper.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationWrapper.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/AuthenticationWrapper.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,47 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+/**
+ * This class is used for correct hierarchy mapping of
+ * Keystone authentication model and java code
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+public class AuthenticationWrapper {
+
+  /**
+   * authentication response field
+   */
+  private AuthenticationResponse access;
+
+  /**
+   * @return authentication response
+   */
+  public AuthenticationResponse getAccess() {
+    return access;
+  }
+
+  /**
+   * @param access sets authentication response
+   */
+  public void setAccess(AuthenticationResponse access) {
+    this.access = access;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/KeyStoneAuthRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/KeyStoneAuthRequest.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/KeyStoneAuthRequest.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/KeyStoneAuthRequest.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+/**
+ * Class that represents authentication to OpenStack Keystone.
+ * Contains basic authentication information.
+ * Used when {@link ApiKeyAuthenticationRequest} is not applicable.
+ * (problem with different Keystone installations/versions/modifications)
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+public class KeyStoneAuthRequest extends AuthenticationRequest {
+
+  /**
+   * Credentials for Keystone authentication
+   */
+  private KeystoneApiKeyCredentials apiAccessKeyCredentials;
+
+  /**
+   * @param tenant                  Keystone tenant name for authentication
+   * @param apiAccessKeyCredentials Credentials for authentication
+   */
+  public KeyStoneAuthRequest(String tenant, KeystoneApiKeyCredentials apiAccessKeyCredentials) {
+    this.apiAccessKeyCredentials = apiAccessKeyCredentials;
+    this.tenantName = tenant;
+  }
+
+  public KeystoneApiKeyCredentials getApiAccessKeyCredentials() {
+    return apiAccessKeyCredentials;
+  }
+
+  public void setApiAccessKeyCredentials(KeystoneApiKeyCredentials apiAccessKeyCredentials) {
+    this.apiAccessKeyCredentials = apiAccessKeyCredentials;
+  }
+
+  @Override
+  public String toString() {
+    return "KeyStoneAuthRequest as " +
+            "tenant '" + tenantName + "' "
+            + apiAccessKeyCredentials;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/KeystoneApiKeyCredentials.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/KeystoneApiKeyCredentials.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/KeystoneApiKeyCredentials.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/KeystoneApiKeyCredentials.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+/**
+ * Class for Keystone authentication.
+ * Used when {@link ApiKeyCredentials} is not applicable
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+public class KeystoneApiKeyCredentials {
+
+  /**
+   * User access key
+   */
+  private String accessKey;
+
+  /**
+   * User access secret
+   */
+  private String secretKey;
+
+  public KeystoneApiKeyCredentials(String accessKey, String secretKey) {
+    this.accessKey = accessKey;
+    this.secretKey = secretKey;
+  }
+
+  public String getAccessKey() {
+    return accessKey;
+  }
+
+  public void setAccessKey(String accessKey) {
+    this.accessKey = accessKey;
+  }
+
+  public String getSecretKey() {
+    return secretKey;
+  }
+
+  public void setSecretKey(String secretKey) {
+    this.secretKey = secretKey;
+  }
+
+  @Override
+  public String toString() {
+    return "user " +
+            "'" + accessKey + '\'' +
+            " with key of length " + ((secretKey == null) ? 0 : secretKey.length());
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/PasswordAuthenticationRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/PasswordAuthenticationRequest.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/PasswordAuthenticationRequest.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/PasswordAuthenticationRequest.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+/**
+ * Class that represents authentication request to Openstack Keystone.
+ * Contains basic authentication information.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+public class PasswordAuthenticationRequest extends AuthenticationRequest {
+  /**
+   * Credentials for login
+   */
+  private PasswordCredentials passwordCredentials;
+
+  /**
+   * @param tenantName tenant
+   * @param passwordCredentials password credentials
+   */
+  public PasswordAuthenticationRequest(String tenantName, PasswordCredentials passwordCredentials) {
+    this.tenantName = tenantName;
+    this.passwordCredentials = passwordCredentials;
+  }
+
+  /**
+   * @return credentials for login into Keystone
+   */
+  public PasswordCredentials getPasswordCredentials() {
+    return passwordCredentials;
+  }
+
+  /**
+   * @param passwordCredentials credentials for login into Keystone
+   */
+  public void setPasswordCredentials(PasswordCredentials passwordCredentials) {
+    this.passwordCredentials = passwordCredentials;
+  }
+
+  @Override
+  public String toString() {
+    return "Authenticate as " +
+           "tenant '" + tenantName + "' "
+           + passwordCredentials;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/PasswordCredentials.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/PasswordCredentials.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/PasswordCredentials.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/PasswordCredentials.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,87 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+
+/**
+ * Describes credentials to log in Swift using Keystone authentication.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+public class PasswordCredentials {
+  /**
+   * user login
+   */
+  private String username;
+
+  /**
+   * user password
+   */
+  private String password;
+
+  /**
+   * default constructor
+   */
+  public PasswordCredentials() {
+  }
+
+  /**
+   * @param username user login
+   * @param password user password
+   */
+  public PasswordCredentials(String username, String password) {
+    this.username = username;
+    this.password = password;
+  }
+
+  /**
+   * @return user password
+   */
+  public String getPassword() {
+    return password;
+  }
+
+  /**
+   * @param password user password
+   */
+  public void setPassword(String password) {
+    this.password = password;
+  }
+
+  /**
+   * @return login
+   */
+  public String getUsername() {
+    return username;
+  }
+
+  /**
+   * @param username login
+   */
+  public void setUsername(String username) {
+    this.username = username;
+  }
+
+  @Override
+  public String toString() {
+    return "user '" + username + '\'' +
+            " with password of length " + ((password == null) ? 0 : password.length());
+  }
+}
+

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/Roles.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/Roles.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/Roles.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/Roles.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,97 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth;
+
+/**
+ * Describes user roles in Openstack system.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+public class Roles {
+  /**
+   * role name
+   */
+  private String name;
+
+  /**
+   * This field user in RackSpace auth model
+   */
+  private String id;
+
+  /**
+   * This field user in RackSpace auth model
+   */
+  private String description;
+
+  /**
+   * Service id used in HP public Cloud
+   */
+  private String serviceId;
+
+  /**
+   * Service id used in HP public Cloud
+   */
+  private String tenantId;
+
+  /**
+   * @return role name
+   */
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * @param name role name
+   */
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  public void setId(String id) {
+    this.id = id;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  public void setDescription(String description) {
+    this.description = description;
+  }
+
+  public String getServiceId() {
+    return serviceId;
+  }
+
+  public void setServiceId(String serviceId) {
+    this.serviceId = serviceId;
+  }
+
+  public String getTenantId() {
+    return tenantId;
+  }
+
+  public void setTenantId(String tenantId) {
+    this.tenantId = tenantId;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/AccessToken.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/AccessToken.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/AccessToken.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/AccessToken.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,107 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth.entities;
+
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+
+/**
+ * Access token representation of Openstack Keystone authentication.
+ * Class holds token id, tenant and expiration time.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ *
+ * Example:
+ * <pre>
+ * "token" : {
+ *   "RAX-AUTH:authenticatedBy" : [ "APIKEY" ],
+ *   "expires" : "2013-07-12T05:19:24.685-05:00",
+ *   "id" : "8bbea4215113abdab9d4c8fb0d37",
+ *   "tenant" : { "id" : "01011970",
+ *   "name" : "77777"
+ *   }
+ *  }
+ * </pre>
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+public class AccessToken {
+  /**
+   * token expiration time
+   */
+  private String expires;
+  /**
+   * token id
+   */
+  private String id;
+  /**
+   * tenant name for whom id is attached
+   */
+  private Tenant tenant;
+
+  /**
+   * @return token expiration time
+   */
+  public String getExpires() {
+    return expires;
+  }
+
+  /**
+   * @param expires the token expiration time
+   */
+  public void setExpires(String expires) {
+    this.expires = expires;
+  }
+
+  /**
+   * @return token value
+   */
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * @param id token value
+   */
+  public void setId(String id) {
+    this.id = id;
+  }
+
+  /**
+   * @return tenant authenticated in Openstack Keystone
+   */
+  public Tenant getTenant() {
+    return tenant;
+  }
+
+  /**
+   * @param tenant tenant authenticated in Openstack Keystone
+   */
+  public void setTenant(Tenant tenant) {
+    this.tenant = tenant;
+  }
+
+  @Override
+  public String toString() {
+    return "AccessToken{" +
+            "id='" + id + '\'' +
+            ", tenant=" + tenant +
+            ", expires='" + expires + '\'' +
+            '}';
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Catalog.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Catalog.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Catalog.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Catalog.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,107 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth.entities;
+
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+
+import java.util.List;
+
+/**
+ * Describes Openstack Swift REST endpoints.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+public class Catalog {
+  /**
+   * List of valid swift endpoints
+   */
+  private List<Endpoint> endpoints;
+  /**
+   * endpoint links are additional information description
+   * which aren't used in Hadoop and Swift integration scope
+   */
+  private List<Object> endpoints_links;
+  /**
+   * Openstack REST service name. In our case name = "keystone"
+   */
+  private String name;
+
+  /**
+   * Type of REST service. In our case type = "identity"
+   */
+  private String type;
+
+  /**
+   * @return List of endpoints
+   */
+  public List<Endpoint> getEndpoints() {
+    return endpoints;
+  }
+
+  /**
+   * @param endpoints list of endpoints
+   */
+  public void setEndpoints(List<Endpoint> endpoints) {
+    this.endpoints = endpoints;
+  }
+
+  /**
+   * @return list of endpoint links
+   */
+  public List<Object> getEndpoints_links() {
+    return endpoints_links;
+  }
+
+  /**
+   * @param endpoints_links list of endpoint links
+   */
+  public void setEndpoints_links(List<Object> endpoints_links) {
+    this.endpoints_links = endpoints_links;
+  }
+
+  /**
+   * @return name of Openstack REST service
+   */
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * @param name of Openstack REST service
+   */
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  /**
+   * @return type of Openstack REST service
+   */
+  public String getType() {
+    return type;
+  }
+
+  /**
+   * @param type of REST service
+   */
+  public void setType(String type) {
+    this.type = type;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Endpoint.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Endpoint.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Endpoint.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Endpoint.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,194 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth.entities;
+
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+
+import java.net.URI;
+
+/**
+ * Openstack Swift endpoint description.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+public class Endpoint {
+
+  /**
+   * endpoint id
+   */
+  private String id;
+
+  /**
+   * Keystone admin URL
+   */
+  private URI adminURL;
+
+  /**
+   * Keystone internal URL
+   */
+  private URI internalURL;
+
+  /**
+   * public accessible URL
+   */
+  private URI publicURL;
+
+  /**
+   * public accessible URL#2
+   */
+  private URI publicURL2;
+
+  /**
+   * Openstack region name
+   */
+  private String region;
+
+  /**
+   * This field is used in RackSpace authentication model
+   */
+  private String tenantId;
+
+  /**
+   * This field user in RackSpace auth model
+   */
+  private String versionId;
+
+  /**
+   * This field user in RackSpace auth model
+   */
+  private String versionInfo;
+
+  /**
+   * This field user in RackSpace auth model
+   */
+  private String versionList;
+
+
+  /**
+   * @return endpoint id
+   */
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * @param id endpoint id
+   */
+  public void setId(String id) {
+    this.id = id;
+  }
+
+  /**
+   * @return Keystone admin URL
+   */
+  public URI getAdminURL() {
+    return adminURL;
+  }
+
+  /**
+   * @param adminURL Keystone admin URL
+   */
+  public void setAdminURL(URI adminURL) {
+    this.adminURL = adminURL;
+  }
+
+  /**
+   * @return internal Keystone
+   */
+  public URI getInternalURL() {
+    return internalURL;
+  }
+
+  /**
+   * @param internalURL Keystone internal URL
+   */
+  public void setInternalURL(URI internalURL) {
+    this.internalURL = internalURL;
+  }
+
+  /**
+   * @return public accessible URL
+   */
+  public URI getPublicURL() {
+    return publicURL;
+  }
+
+  /**
+   * @param publicURL public URL
+   */
+  public void setPublicURL(URI publicURL) {
+    this.publicURL = publicURL;
+  }
+
+  public URI getPublicURL2() {
+    return publicURL2;
+  }
+
+  public void setPublicURL2(URI publicURL2) {
+    this.publicURL2 = publicURL2;
+  }
+
+  /**
+   * @return Openstack region name
+   */
+  public String getRegion() {
+    return region;
+  }
+
+  /**
+   * @param region Openstack region name
+   */
+  public void setRegion(String region) {
+    this.region = region;
+  }
+
+  public String getTenantId() {
+    return tenantId;
+  }
+
+  public void setTenantId(String tenantId) {
+    this.tenantId = tenantId;
+  }
+
+  public String getVersionId() {
+    return versionId;
+  }
+
+  public void setVersionId(String versionId) {
+    this.versionId = versionId;
+  }
+
+  public String getVersionInfo() {
+    return versionInfo;
+  }
+
+  public void setVersionInfo(String versionInfo) {
+    this.versionInfo = versionInfo;
+  }
+
+  public String getVersionList() {
+    return versionList;
+  }
+
+  public void setVersionList(String versionList) {
+    this.versionList = versionList;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Tenant.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Tenant.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Tenant.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/Tenant.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,107 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth.entities;
+
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+
+/**
+ * Tenant is abstraction in Openstack which describes all account
+ * information and user privileges in system.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Tenant {
+
+  /**
+   * tenant id
+   */
+  private String id;
+
+  /**
+   * tenant short description which Keystone returns
+   */
+  private String description;
+
+  /**
+   * boolean enabled user account or no
+   */
+  private boolean enabled;
+
+  /**
+   * tenant human readable name
+   */
+  private String name;
+
+  /**
+   * @return tenant name
+   */
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * @param name tenant name
+   */
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  /**
+   * @return true if account enabled and false otherwise
+   */
+  public boolean isEnabled() {
+    return enabled;
+  }
+
+  /**
+   * @param enabled enable or disable
+   */
+  public void setEnabled(boolean enabled) {
+    this.enabled = enabled;
+  }
+
+  /**
+   * @return account short description
+   */
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * @param description set account description
+   */
+  public void setDescription(String description) {
+    this.description = description;
+  }
+
+  /**
+   * @return set tenant id
+   */
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * @param id tenant id
+   */
+  public void setId(String id) {
+    this.id = id;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/User.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/User.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/User.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/auth/entities/User.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,132 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.auth.entities;
+
+import org.apache.hadoop.fs.swift.auth.Roles;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+
+import java.util.List;
+
+/**
+ * Describes user entity in Keystone
+ * In different Swift installations User is represented differently.
+ * To avoid any JSON deserialization failures this entity is ignored.
+ * THIS FILE IS MAPPED BY JACKSON TO AND FROM JSON.
+ * DO NOT RENAME OR MODIFY FIELDS AND THEIR ACCESSORS.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class User {
+
+  /**
+   * user id in Keystone
+   */
+  private String id;
+
+  /**
+   * user human readable name
+   */
+  private String name;
+
+  /**
+   * user roles in Keystone
+   */
+  private List<Roles> roles;
+
+  /**
+   * links to user roles
+   */
+  private List<Object> roles_links;
+
+  /**
+   * human readable username in Keystone
+   */
+  private String username;
+
+  /**
+   * @return user id
+   */
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * @param id user id
+   */
+  public void setId(String id) {
+    this.id = id;
+  }
+
+
+  /**
+   * @return user name
+   */
+  public String getName() {
+    return name;
+  }
+
+
+  /**
+   * @param name user name
+   */
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  /**
+   * @return user roles
+   */
+  public List<Roles> getRoles() {
+    return roles;
+  }
+
+  /**
+   * @param roles sets user roles
+   */
+  public void setRoles(List<Roles> roles) {
+    this.roles = roles;
+  }
+
+  /**
+   * @return user roles links
+   */
+  public List<Object> getRoles_links() {
+    return roles_links;
+  }
+
+  /**
+   * @param roles_links user roles links
+   */
+  public void setRoles_links(List<Object> roles_links) {
+    this.roles_links = roles_links;
+  }
+
+  /**
+   * @return username
+   */
+  public String getUsername() {
+    return username;
+  }
+
+  /**
+   * @param username human readable user name
+   */
+  public void setUsername(String username) {
+    this.username = username;
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftAuthenticationFailedException.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftAuthenticationFailedException.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftAuthenticationFailedException.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftAuthenticationFailedException.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.exceptions;
+
+import org.apache.commons.httpclient.HttpMethod;
+
+import java.net.URI;
+
+/**
+ * An exception raised when an authentication request was rejected
+ */
+public class SwiftAuthenticationFailedException extends SwiftInvalidResponseException {
+
+  public SwiftAuthenticationFailedException(String message,
+                                            int statusCode,
+                                            String operation,
+                                            URI uri) {
+    super(message, statusCode, operation, uri);
+  }
+
+  public SwiftAuthenticationFailedException(String message,
+                                            String operation,
+                                            URI uri,
+                                            HttpMethod method) {
+    super(message, operation, uri, method);
+  }
+
+  @Override
+  public String exceptionTitle() {
+    return "Authentication Failure";
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftBadRequestException.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftBadRequestException.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftBadRequestException.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftBadRequestException.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,49 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.exceptions;
+
+import org.apache.commons.httpclient.HttpMethod;
+
+import java.net.URI;
+
+/**
+ * Thrown to indicate that data locality can't be calculated or requested path is incorrect.
+ * Data locality can't be calculated if Openstack Swift version is old.
+ */
+public class SwiftBadRequestException extends SwiftInvalidResponseException {
+
+  public SwiftBadRequestException(String message,
+                                  String operation,
+                                  URI uri,
+                                  HttpMethod method) {
+    super(message, operation, uri, method);
+  }
+
+  public SwiftBadRequestException(String message,
+                                  int statusCode,
+                                  String operation,
+                                  URI uri) {
+    super(message, statusCode, operation, uri);
+  }
+
+  @Override
+  public String exceptionTitle() {
+    return "BadRequest";
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConfigurationException.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConfigurationException.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConfigurationException.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConfigurationException.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.exceptions;
+
+/**
+ * Exception raised to indicate there is some problem with how the Swift FS
+ * is configured
+ */
+public class SwiftConfigurationException extends SwiftException {
+  public SwiftConfigurationException(String message) {
+    super(message);
+  }
+
+  public SwiftConfigurationException(String message, Throwable cause) {
+    super(message, cause);
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConnectionClosedException.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConnectionClosedException.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConnectionClosedException.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConnectionClosedException.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+package org.apache.hadoop.fs.swift.exceptions;
+
+/**
+ * Exception raised when an attempt is made to use a closed stream
+ */
+public class SwiftConnectionClosedException extends SwiftException {
+
+  public static final String MESSAGE =
+    "Connection to Swift service has been closed";
+
+  public SwiftConnectionClosedException() {
+    super(MESSAGE);
+  }
+
+  public SwiftConnectionClosedException(String reason) {
+    super(MESSAGE + ": " + reason);
+  }
+
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConnectionException.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConnectionException.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConnectionException.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftConnectionException.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,35 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.exceptions;
+
+/**
+ * Thrown to indicate that connection is lost or failed to be made
+ */
+public class SwiftConnectionException extends SwiftException {
+  public SwiftConnectionException() {
+  }
+
+  public SwiftConnectionException(String message) {
+    super(message);
+  }
+
+  public SwiftConnectionException(String message, Throwable cause) {
+    super(message, cause);
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftException.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftException.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftException.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftException.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,43 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.exceptions;
+
+import java.io.IOException;
+
+/**
+ * A Swift-specific exception -subclasses exist
+ * for various specific problems.
+ */
+public class SwiftException extends IOException {
+  public SwiftException() {
+    super();
+  }
+
+  public SwiftException(String message) {
+    super(message);
+  }
+
+  public SwiftException(String message, Throwable cause) {
+    super(message, cause);
+  }
+
+  public SwiftException(Throwable cause) {
+    super(cause);
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftInternalStateException.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftInternalStateException.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftInternalStateException.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftInternalStateException.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.exceptions;
+
+/**
+ * The internal state of the Swift client is wrong -presumably a sign
+ * of some bug
+ */
+public class SwiftInternalStateException extends SwiftException {
+
+  public SwiftInternalStateException(String message) {
+    super(message);
+  }
+
+  public SwiftInternalStateException(String message, Throwable cause) {
+    super(message, cause);
+  }
+
+  public SwiftInternalStateException(Throwable cause) {
+    super(cause);
+  }
+}

Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftInvalidResponseException.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftInvalidResponseException.java?rev=1526848&view=auto
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftInvalidResponseException.java (added)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/exceptions/SwiftInvalidResponseException.java Fri Sep 27 11:12:42 2013
@@ -0,0 +1,117 @@
+/*
+ * 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.
+ */
+
+package org.apache.hadoop.fs.swift.exceptions;
+
+import org.apache.commons.httpclient.HttpMethod;
+
+import java.io.IOException;
+import java.net.URI;
+
+/**
+ * Exception raised when the HTTP code is invalid. The status code,
+ * method name and operation URI are all in the response.
+ */
+public class SwiftInvalidResponseException extends SwiftConnectionException {
+
+  public final int statusCode;
+  public final String operation;
+  public final URI uri;
+  public final String body;
+
+  public SwiftInvalidResponseException(String message,
+                                       int statusCode,
+                                       String operation,
+                                       URI uri) {
+    super(message);
+    this.statusCode = statusCode;
+    this.operation = operation;
+    this.uri = uri;
+    this.body = "";
+  }
+
+  public SwiftInvalidResponseException(String message,
+                                       String operation,
+                                       URI uri,
+                                       HttpMethod method) {
+    super(message);
+    this.statusCode = method.getStatusCode();
+    this.operation = operation;
+    this.uri = uri;
+    String bodyAsString;
+    try {
+      bodyAsString = method.getResponseBodyAsString();
+      if (bodyAsString == null) {
+        bodyAsString = "";
+      }
+    } catch (IOException e) {
+      bodyAsString = "";
+    }
+    this.body = bodyAsString;
+  }
+
+  public int getStatusCode() {
+    return statusCode;
+  }
+
+  public String getOperation() {
+    return operation;
+  }
+
+  public URI getUri() {
+    return uri;
+  }
+
+  public String getBody() {
+    return body;
+  }
+
+  /**
+   * Override point: title of an exception -this is used in the
+   * toString() method.
+   * @return the new exception title
+   */
+  public String exceptionTitle() {
+    return "Invalid Response";
+  }
+
+  /**
+   * Build a description that includes the exception title, the URI,
+   * the message, the status code -and any body of the response
+   * @return the string value for display
+   */
+  @Override
+  public String toString() {
+    StringBuilder msg = new StringBuilder();
+    msg.append(exceptionTitle());
+    msg.append(": ");
+    msg.append(getMessage());
+    msg.append("  ");
+    msg.append(operation);
+    msg.append(" ");
+    msg.append(uri);
+    msg.append(" => ");
+    msg.append(statusCode);
+    if (body != null && !body.isEmpty()) {
+      msg.append(" : ");
+      msg.append(body);
+    }
+
+    return msg.toString();
+  }
+}



Mime
View raw message