* buffer.
*/
private AckFramingState checkAndStripAckFraming(final File dir,
final String f, MemorySinkSource mem) throws InterruptedException,
IOException {
EventSource src = new SeqfileEventSource(new File(dir, f).getAbsolutePath());
AckFramingState state = new AckFramingState();
// strip previous ack tagged attributes out of events before putting raw
// events.
EventSink mask = new MaskDecorator<EventSink>(mem,
AckChecksumInjector.ATTR_ACK_TYPE, AckChecksumInjector.ATTR_ACK_TAG,
AckChecksumInjector.ATTR_ACK_HASH);
// check for and extract the ack events.
AckChecksumChecker<EventSink> check = new AckChecksumChecker<EventSink>(
mask, state);
try {
// copy all raw events into mem buffer
src.open();
check.open();
EventUtil.dumpAll(src, check);
src.close();
check.close();
} catch (IOException e) {
LOG.warn("Recovered log file {} was corrupt", f);
throw e;
}