HBASE-21190 Log files and count of entries in each as we load from the MasterProcWAL store

This commit is contained in:
Michael Stack 2018-09-12 10:13:43 -07:00
parent e9d23d5d25
commit 9d13196485
2 changed files with 4 additions and 2 deletions

View File

@ -83,7 +83,6 @@ public final class ProcedureWALFormat {
// Ignore the last log which is current active log. // Ignore the last log which is current active log.
while (logs.hasNext()) { while (logs.hasNext()) {
ProcedureWALFile log = logs.next(); ProcedureWALFile log = logs.next();
LOG.debug("Loading WAL id={}", log.getLogId());
log.open(); log.open();
try { try {
reader.read(log); reader.read(log);

View File

@ -140,6 +140,7 @@ public class ProcedureWALFormatReader {
LOG.info("Rebuilding tracker for " + log); LOG.info("Rebuilding tracker for " + log);
} }
long count = 0;
FSDataInputStream stream = log.getStream(); FSDataInputStream stream = log.getStream();
try { try {
boolean hasMore = true; boolean hasMore = true;
@ -149,6 +150,7 @@ public class ProcedureWALFormatReader {
LOG.warn("Nothing left to decode. Exiting with missing EOF, log=" + log); LOG.warn("Nothing left to decode. Exiting with missing EOF, log=" + log);
break; break;
} }
count++;
switch (entry.getType()) { switch (entry.getType()) {
case PROCEDURE_WAL_INIT: case PROCEDURE_WAL_INIT:
readInitEntry(entry); readInitEntry(entry);
@ -170,8 +172,9 @@ public class ProcedureWALFormatReader {
throw new CorruptedWALProcedureStoreException("Invalid entry: " + entry); throw new CorruptedWALProcedureStoreException("Invalid entry: " + entry);
} }
} }
LOG.info("Read {} entries in {}", count, log);
} catch (InvalidProtocolBufferException e) { } catch (InvalidProtocolBufferException e) {
LOG.error("While reading procedure from " + log, e); LOG.error("While reading entry #{} in {}", count, log, e);
loader.markCorruptedWAL(log, e); loader.markCorruptedWAL(log, e);
} }