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

This commit is contained in:
Arpit Agarwal 2017-01-26 16:21:25 -08:00
parent 67d2875f8f
commit 17d4ba26fc
1 changed files with 1 additions and 1 deletions

View File

@ -200,8 +200,8 @@ public class CreateEditsLog {
}
}
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,