hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aajis...@apache.org
Subject hadoop git commit: HADOOP-10296. Incorrect null check in SwiftRestClient#buildException(). Contributed by Rahul Palamuttam and Kanaka Kumar Avvaru.
Date Thu, 01 Oct 2015 16:36:11 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 e42f57623 -> c6f30e591


HADOOP-10296. Incorrect null check in SwiftRestClient#buildException(). Contributed by Rahul
Palamuttam and Kanaka Kumar Avvaru.

(cherry picked from commit ecbfd68974691cc9103ae477d10c15c7f21b6dea)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c6f30e59
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c6f30e59
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c6f30e59

Branch: refs/heads/branch-2
Commit: c6f30e5913d1728a5856b83ed5a68e1dffcba37d
Parents: e42f576
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Thu Oct 1 18:25:31 2015 +0200
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Thu Oct 1 18:35:19 2015 +0200

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt |  3 +++
 .../hadoop/fs/swift/http/SwiftRestClient.java   | 20 +-------------------
 2 files changed, 4 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c6f30e59/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 04a172d..bdc9946 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -598,6 +598,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-12448. TestTextCommand: use mkdirs rather than mkdir to create test
     directory. (Contributed by Colin Patrick McCabe and Chris Nauroth)
 
+    HADOOP-10296. Incorrect null check in SwiftRestClient#buildException().
+    (Rahul Palamuttam and Kanaka Kumar Avvaru via aajisaka)
+
   OPTIMIZATIONS
 
     HADOOP-12051. ProtobufRpcEngine.invoke() should use Exception.toString()

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c6f30e59/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java
b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java
index 55dad11..2684ab4 100644
--- a/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java
+++ b/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/SwiftRestClient.java
@@ -172,8 +172,6 @@ public final class SwiftRestClient {
    */
   private URI objectLocationURI;
 
-  private final URI filesystemURI;
-
   /**
    * The name of the service provider
    */
@@ -238,13 +236,6 @@ public final class SwiftRestClient {
   }
 
   /**
-   * object location endpoint
-   */
-  private synchronized URI getObjectLocationURI() {
-    return objectLocationURI;
-  }
-
-  /**
    * token for Swift communication
    */
   private synchronized AccessToken getToken() {
@@ -331,13 +322,6 @@ public final class SwiftRestClient {
     }
   }
 
-  private static abstract class PostMethodProcessor<R> extends HttpMethodProcessor<PostMethod,
R> {
-    @Override
-    protected final PostMethod doCreateMethod(String uri) {
-      return new PostMethod(uri);
-    }
-  }
-
   /**
    * There's a special type for auth messages, so that low-level
    * message handlers can react to auth failures differently from everything
@@ -449,7 +433,6 @@ public final class SwiftRestClient {
   private SwiftRestClient(URI filesystemURI,
                           Configuration conf)
       throws SwiftConfigurationException {
-    this.filesystemURI = filesystemURI;
     Properties props = RestClientBindings.bind(filesystemURI, conf);
     String stringAuthUri = getOption(props, SWIFT_AUTH_PROPERTY);
     username = getOption(props, SWIFT_USERNAME_PROPERTY);
@@ -1129,7 +1112,6 @@ public final class SwiftRestClient {
       final List<Catalog> serviceCatalog = access.getServiceCatalog();
       //locate the specific service catalog that defines Swift; variations
       //in the name of this add complexity to the search
-      boolean catalogMatch = false;
       StringBuilder catList = new StringBuilder();
       StringBuilder regionList = new StringBuilder();
 
@@ -1470,7 +1452,7 @@ public final class SwiftRestClient {
         //and the result
         Header availableContentRange = method.getResponseHeader(
           HEADER_CONTENT_RANGE);
-        if (requestContentLen!=null) {
+        if (availableContentRange != null) {
           errorText.append(" available ").append(availableContentRange.getValue());
         }
         fault = new EOFException(errorText.toString());


Mime
View raw message