فهرست منبع

HADOOP-1910. Reduce the number of RPCs that DistributedFileSystem.create()
makes to the namenode. (Raghu Angadi via dhruba)



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@579750 13f79535-47bb-0310-9956-ffa450edef68

Dhruba Borthakur 17 سال پیش
والد
کامیت
c18bfd5e67
2فایلهای تغییر یافته به همراه3 افزوده شده و 7 حذف شده
  1. 3 0
      CHANGES.txt
  2. 0 7
      src/java/org/apache/hadoop/dfs/DistributedFileSystem.java

+ 3 - 0
CHANGES.txt

@@ -64,6 +64,9 @@ Trunk (unreleased changes)
 
 
   OPTIMIZATIONS
   OPTIMIZATIONS
 
 
+    HADOOP-1910.  Reduce the number of RPCs that DistributedFileSystem.create()
+    makes to the namenode. (Raghu Angadi via dhruba)
+
     HADOOP-1565.  Reduce memory usage of NameNode by replacing 
     HADOOP-1565.  Reduce memory usage of NameNode by replacing 
     TreeMap in HDFS Namespace with ArrayList.  
     TreeMap in HDFS Namespace with ArrayList.  
     (Dhruba Borthakur via dhruba)
     (Dhruba Borthakur via dhruba)

+ 0 - 7
src/java/org/apache/hadoop/dfs/DistributedFileSystem.java

@@ -117,13 +117,6 @@ public class DistributedFileSystem extends FileSystem {
   public FSDataOutputStream create(Path f, boolean overwrite,
   public FSDataOutputStream create(Path f, boolean overwrite,
     int bufferSize, short replication, long blockSize,
     int bufferSize, short replication, long blockSize,
     Progressable progress) throws IOException {
     Progressable progress) throws IOException {
-    if (exists(f) && !overwrite) {
-      throw new IOException("File already exists:"+f);
-    }
-    Path parent = f.getParent();
-    if (parent != null && !mkdirs(parent)) {
-      throw new IOException("Mkdirs failed to create " + parent);
-    }
 
 
     return new FSDataOutputStream( dfs.create(getPathName(f), overwrite, 
     return new FSDataOutputStream( dfs.create(getPathName(f), overwrite, 
                                               replication, blockSize, 
                                               replication, blockSize,