HADOOP-13154. S3AFileSystem printAmazonServiceException/printAmazonClientException appear copy & paste of AWS examples. Contributed by Steve Loughran.
This commit is contained in:
parent
0ee36fd511
commit
0abb366364
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue