int numEdits = 0;
File jSpoolFile = getJSpoolFile(sdEdits);
long startTime = FSNamesystem.now();
if(jSpoolFile.exists()) {
// load edits.new
EditLogFileInputStream edits = new EditLogFileInputStream(jSpoolFile);
DataInputStream in = edits.getDataInputStream();
numEdits += editLog.loadFSEdits(in, false);
// first time reached the end of spool
jsState = JSpoolState.WAIT;
numEdits += editLog.loadEditRecords(getLayoutVersion(), in, true);
getFSNamesystem().dir.updateCountForINodeWithQuota();
edits.close();
}
FSImage.LOG.info("Edits file " + jSpoolFile.getCanonicalPath()
+ " of size " + jSpoolFile.length() + " edits # " + numEdits
+ " loaded in " + (FSNamesystem.now()-startTime)/1000 + " seconds.");