Explorar el Código

HDFS-11374. Skip FSync in CreateEditsLog to speed up edit log generation. Contributed by Hanisha Koneru.

Arpit Agarwal hace 8 años
padre
commit
17d4ba26fc

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.java

@@ -199,9 +199,9 @@ public class CreateEditsLog {
         System.exit(-1);
       }
     }
-    
 
     FileNameGenerator nameGenerator = new FileNameGenerator(BASE_PATH, 100);
+    EditLogFileOutputStream.setShouldSkipFsyncForTesting(true);
     FSEditLog editLog = FSImageTestUtil.createStandaloneEditLog(editsLogDir);
     editLog.openForWrite(NameNodeLayoutVersion.CURRENT_LAYOUT_VERSION);
     addFiles(editLog, numFiles, replication, numBlocksPerFile, startingBlockId,