Author: cdouglas
Date: Mon Aug 25 18:51:41 2008
New Revision: 688936
URL: http://svn.apache.org/viewvc?rev=688936&view=rev
Log:
HADOOP-3506. Fix a rare NPE caused by error handling in S3. Contributed by Tom
White.
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java
hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3/MigrationTool.java
hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/Jets3tNativeFileSystemStore.java
Modified: hadoop/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=688936&r1=688935&r2=688936&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Aug 25 18:51:41 2008
@@ -365,6 +365,9 @@
HADOOP-3785. Fix FileSystem cache to be case-insensitive for scheme and
authority. (Bill de hOra via cdouglas)
+ HADOOP-3506. Fix a rare NPE caused by error handling in S3. (Tom White via
+ cdouglas)
+
Release 0.18.0 - 2008-08-19
INCOMPATIBLE CHANGES
Modified:
hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java?rev=688936&r1=688935&r2=688936&view=diff
==============================================================================
---
hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java
(original)
+++
hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java
Mon Aug 25 18:51:41 2008
@@ -160,7 +160,7 @@
}
return object.getDataInputStream();
} catch (S3ServiceException e) {
- if (e.getS3ErrorCode().equals("NoSuchKey")) {
+ if ("NoSuchKey".equals(e.getS3ErrorCode())) {
return null;
}
if (e.getCause() instanceof IOException) {
@@ -176,7 +176,7 @@
null, byteRangeStart, null);
return object.getDataInputStream();
} catch (S3ServiceException e) {
- if (e.getS3ErrorCode().equals("NoSuchKey")) {
+ if ("NoSuchKey".equals(e.getS3ErrorCode())) {
return null;
}
if (e.getCause() instanceof IOException) {
Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3/MigrationTool.java
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3/MigrationTool.java?rev=688936&r1=688935&r2=688936&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3/MigrationTool.java
(original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3/MigrationTool.java Mon
Aug 25 18:51:41 2008
@@ -174,7 +174,7 @@
try {
return s3Service.getObject(bucket, key);
} catch (S3ServiceException e) {
- if (e.getS3ErrorCode().equals("NoSuchKey")) {
+ if ("NoSuchKey".equals(e.getS3ErrorCode())) {
return null;
}
}
@@ -232,7 +232,7 @@
S3Object object = s3Service.getObject(bucket, key);
return object.getDataInputStream();
} catch (S3ServiceException e) {
- if (e.getS3ErrorCode().equals("NoSuchKey")) {
+ if ("NoSuchKey".equals(e.getS3ErrorCode())) {
return null;
}
if (e.getCause() instanceof IOException) {
Modified:
hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/Jets3tNativeFileSystemStore.java
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/Jets3tNativeFileSystemStore.java?rev=688936&r1=688935&r2=688936&view=diff
==============================================================================
---
hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/Jets3tNativeFileSystemStore.java
(original)
+++
hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/Jets3tNativeFileSystemStore.java
Mon Aug 25 18:51:41 2008
@@ -140,7 +140,7 @@
S3Object object = s3Service.getObject(bucket, key);
return object.getDataInputStream();
} catch (S3ServiceException e) {
- if (e.getS3ErrorCode().equals("NoSuchKey")) {
+ if ("NoSuchKey".equals(e.getS3ErrorCode())) {
return null;
}
if (e.getCause() instanceof IOException) {
@@ -157,7 +157,7 @@
null, byteRangeStart, null);
return object.getDataInputStream();
} catch (S3ServiceException e) {
- if (e.getS3ErrorCode().equals("NoSuchKey")) {
+ if ("NoSuchKey".equals(e.getS3ErrorCode())) {
return null;
}
if (e.getCause() instanceof IOException) {