hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cnaur...@apache.org
Subject hadoop git commit: HADOOP-13154. S3AFileSystem printAmazonServiceException/printAmazonClientException appear copy & paste of AWS examples. Contributed by Steve Loughran.
Date Fri, 20 May 2016 04:40:38 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.7 0ee36fd51 -> 0abb36636


HADOOP-13154. S3AFileSystem printAmazonServiceException/printAmazonClientException appear
copy & paste of AWS examples. Contributed by Steve Loughran.


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

Branch: refs/heads/branch-2.7
Commit: 0abb3663647cbadfb340328f623136060b82e1b7
Parents: 0ee36fd
Author: Chris Nauroth <cnauroth@apache.org>
Authored: Thu May 19 21:40:17 2016 -0700
Committer: Chris Nauroth <cnauroth@apache.org>
Committed: Thu May 19 21:40:17 2016 -0700

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt |  4 ++++
 .../org/apache/hadoop/fs/s3a/S3AFileSystem.java | 25 ++++++--------------
 2 files changed, 11 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/0abb3663/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 4b82084..b36036b 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -94,6 +94,10 @@ Release 2.7.3 - UNRELEASED
     HADOOP-13084. Fix ASF License warnings in branch-2.7.
     (Brahma Reddy Battula via aajisaka)
 
+    HADOOP-13154. S3AFileSystem
+    printAmazonServiceException/printAmazonClientException appear copy & paste
+    of AWS examples. (Steve Loughran via cnauroth)
+
 Release 2.7.2 - 2016-01-25
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/0abb3663/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
index 91a606c..9880037 100644
--- a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
+++ b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
@@ -913,7 +913,6 @@ public class S3AFileSystem extends FileSystem {
           throw e;
         }
       } catch (AmazonClientException e) {
-        printAmazonClientException(e);
         throw e;
       }
 
@@ -943,7 +942,6 @@ public class S3AFileSystem extends FileSystem {
             throw e;
           }
         } catch (AmazonClientException e) {
-          printAmazonClientException(e);
           throw e;
         }
       }
@@ -986,7 +984,6 @@ public class S3AFileSystem extends FileSystem {
         throw e;
       }
     } catch (AmazonClientException e) {
-      printAmazonClientException(e);
       throw e;
     }
 
@@ -1207,20 +1204,12 @@ public class S3AFileSystem extends FileSystem {
   }
 
   private void printAmazonServiceException(AmazonServiceException ase) {
-    LOG.info("Caught an AmazonServiceException, which means your request made it " +
-        "to Amazon S3, but was rejected with an error response for some reason.");
-    LOG.info("Error Message: " + ase.getMessage());
-    LOG.info("HTTP Status Code: " + ase.getStatusCode());
-    LOG.info("AWS Error Code: " + ase.getErrorCode());
-    LOG.info("Error Type: " + ase.getErrorType());
-    LOG.info("Request ID: " + ase.getRequestId());
-    LOG.info("Class Name: " + ase.getClass().getName());
-  }
-
-  private void printAmazonClientException(AmazonClientException ace) {
-    LOG.info("Caught an AmazonClientException, which means the client encountered " +
-        "a serious internal problem while trying to communicate with S3, " +
-        "such as not being able to access the network.");
-    LOG.info("Error Message: {}" + ace, ace);
+    LOG.info("Caught an AmazonServiceException {}", ase.toString());
+    LOG.info("Error Message: {}", ase.getMessage());
+    LOG.info("HTTP Status Code: {}", ase.getStatusCode());
+    LOG.info("AWS Error Code: {}", ase.getErrorCode());
+    LOG.info("Error Type: {}", ase.getErrorType());
+    LOG.info("Request ID: {}", ase.getRequestId());
+    LOG.info("Stack", ase);
   }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message