fs.setConf(new Configuration());
} else {
fs = path.getFileSystem(new Configuration());
}
HeaderBasedInitialization inOut;
if (!fs.exists(path)) {
inOut = headerManagement.createAndWriteHeader(fs, path, eventClass);
} else {
inOut = headerManagement.verifyHeaderAndOpen(fs, path, eventClass);
}
try {
counter = logResolver.resolveUncommittedEvents(inOut.getIn(), uncommittedEvents,
eventClass, fs.getFileStatus(path).getLen(), location);
inOut.getIn().close();
output = inOut.getOut();
} catch (CorruptLogException e) {
corruptionHandler.handleCorruption(e);
}
}