Browse Source

HADOOP-4422. S3 file systems should not create bucket. Contributed by David Phillips.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@720476 13f79535-47bb-0310-9956-ffa450edef68
Thomas White 16 năm trước cách đây
mục cha
commit
4d85499020

+ 3 - 0
CHANGES.txt

@@ -41,6 +41,9 @@ Trunk (unreleased changes)
       JobClient::getCommandLineConfig is removed
       JobShell, TestJobShell classes are removed
 
+    HADOOP-4422. S3 file systems should not create bucket.
+    (David Phillips via tomwhite)
+
   NEW FEATURES
 
     HADOOP-4575. Add a proxy service for relaying HsftpFileSystem requests.

+ 0 - 13
src/core/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java

@@ -93,22 +93,9 @@ class Jets3tFileSystemStore implements FileSystemStore {
     }
     bucket = new S3Bucket(uri.getHost());
 
-    createBucket(bucket.getName());
-    
     this.bufferSize = conf.getInt("io.file.buffer.size", 4096);
   }
 
-  private void createBucket(String bucketName) throws IOException {
-    try {
-      s3Service.createBucket(bucketName);
-    } catch (S3ServiceException e) {
-      if (e.getCause() instanceof IOException) {
-        throw (IOException) e.getCause();
-      }
-      throw new S3Exception(e);
-    }
-  }
-  
   public String getVersion() throws IOException {
     return FILE_SYSTEM_VERSION_VALUE;
   }

+ 0 - 14
src/core/org/apache/hadoop/fs/s3native/Jets3tNativeFileSystemStore.java

@@ -59,20 +59,6 @@ class Jets3tNativeFileSystemStore implements NativeFileSystemStore {
       throw new S3Exception(e);
     }
     bucket = new S3Bucket(uri.getHost());
-
-    createBucket(bucket.getName());
-
-  }
-  
-  private void createBucket(String bucketName) throws IOException {
-    try {
-      s3Service.createBucket(bucketName);
-    } catch (S3ServiceException e) {
-      if (e.getCause() instanceof IOException) {
-        throw (IOException) e.getCause();
-      }
-      throw new S3Exception(e);
-    }
   }
   
   public void storeFile(String key, File file, byte[] md5Hash)