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

Conflicts:
	hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFormatReader.java
This commit is contained in:
Michael Stack 2018-09-12 10:13:43 -07:00 committed by Andrew Purtell
parent 0a2ebdce15
commit 02089f20b4
No known key found for this signature in database
GPG Key ID: 8597754DD5365CCD
1 changed files with 4 additions and 1 deletions

View File

@ -113,6 +113,7 @@ public class ProcedureWALFormatReader {
}
public void read(ProcedureWALFile log, ProcedureWALFormat.Loader loader) throws IOException {
long count = 0;
FSDataInputStream stream = log.getStream();
try {
boolean hasMore = true;
@ -123,6 +124,7 @@ public class ProcedureWALFormatReader {
hasMore = false;
break;
}
count++;
switch (entry.getType()) {
case PROCEDURE_WAL_INIT:
readInitEntry(entry);
@ -144,8 +146,9 @@ public class ProcedureWALFormatReader {
throw new CorruptedWALProcedureStoreException("Invalid entry: " + entry);
}
}
LOG.info("Read " + count + " entries in " + log);
} catch (InvalidProtocolBufferException e) {
LOG.error("got an exception while reading the procedure WAL: " + log, e);
LOG.error("While reading entry #" + count + " in " + log, e);
loader.markCorruptedWAL(log, e);
}