HBASE-18623 Frequent failed to parse at EOF warnings from WALEntryStream

This commit is contained in:
Andrew Purtell 2017-08-18 17:13:51 -07:00
parent 2e069df6bf
commit 7fef606349

View File

@ -233,9 +233,11 @@ public class WALEntryStream implements Iterator<Entry>, Closeable, Iterable<Entr
if (trailerSize < 0) { if (trailerSize < 0) {
if (currentPosition < stat.getLen()) { if (currentPosition < stat.getLen()) {
final long skippedBytes = stat.getLen() - currentPosition; final long skippedBytes = stat.getLen() - currentPosition;
LOG.info("Reached the end of WAL file '" + currentPath if (LOG.isDebugEnabled()) {
+ "'. It was not closed cleanly, so we did not parse " + skippedBytes LOG.debug("Reached the end of WAL file '" + currentPath
+ " bytes of data."); + "'. It was not closed cleanly, so we did not parse " + skippedBytes
+ " bytes of data. This is normally ok.");
}
metrics.incrUncleanlyClosedWALs(); metrics.incrUncleanlyClosedWALs();
metrics.incrBytesSkippedInUncleanlyClosedWALs(skippedBytes); metrics.incrBytesSkippedInUncleanlyClosedWALs(skippedBytes);
} }