HBASE-21190 Log files and count of entries in each as we load from the MasterProcWAL store
This commit is contained in:
parent
e9d23d5d25
commit
9d13196485
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue