Parcourir la source

Fix createNewFile() so that it creates a .crc file, like everything
else does. This fixes some annoyances in Nutch.


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

Doug Cutting il y a 19 ans
Parent
commit
f16d9f54b7
1 fichiers modifiés avec 2 ajouts et 7 suppressions
  1. 2 7
      src/java/org/apache/hadoop/fs/FileSystem.java

+ 2 - 7
src/java/org/apache/hadoop/fs/FileSystem.java

@@ -243,13 +243,8 @@ public abstract class FileSystem extends Configured {
         if (exists(f)) {
             return false;
         } else {
-            OutputStream out = createRaw(f, false, 
-                                (short)getConf().getInt("dfs.replication", 3));
-            try {
-            } finally {
-              out.close();
-            }
-            return true;
+          create(f,false,getConf().getInt("io.file.buffer.size", 4096)).close();
+          return true;
         }
     }