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 d81e806718
commit 487f713c63
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.
while (logs.hasNext()) {
ProcedureWALFile log = logs.next();
LOG.debug("Loading WAL id={}", log.getLogId());
log.open();
try {
reader.read(log);

View File

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