You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by dh...@apache.org on 2007/09/26 20:29:08 UTC

svn commit: r579750 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/DistributedFileSystem.java

Author: dhruba
Date: Wed Sep 26 11:29:07 2007
New Revision: 579750

URL: http://svn.apache.org/viewvc?rev=579750&view=rev
Log:
HADOOP-1910.  Reduce the number of RPCs that DistributedFileSystem.create()
makes to the namenode. (Raghu Angadi via dhruba)


Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=579750&r1=579749&r2=579750&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Sep 26 11:29:07 2007
@@ -64,6 +64,9 @@
 
   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 
     TreeMap in HDFS Namespace with ArrayList.  
     (Dhruba Borthakur via dhruba)

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java?rev=579750&r1=579749&r2=579750&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java Wed Sep 26 11:29:07 2007
@@ -117,13 +117,6 @@
   public FSDataOutputStream create(Path f, boolean overwrite,
     int bufferSize, short replication, long blockSize,
     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, 
                                               replication, blockSize,