HBASE-23207 Log a region open journal (#751)

Signed-off-by: Abhishek Singh Chouhan <achouhan@apache.org>
This commit is contained in:
Andrew Purtell 2019-10-23 17:17:06 -07:00 committed by GitHub
parent 59fc163e94
commit b14ba58c5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -912,6 +912,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
}
MonitoredTask status = TaskMonitor.get().createStatus("Initializing region " + this);
status.enableStatusJournal(true);
long nextSeqId = -1;
try {
nextSeqId = initializeRegionInternals(reporter, status);
@ -939,6 +940,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
status.abort("Exception during region " + getRegionInfo().getRegionNameAsString() +
" initialization.");
}
if (LOG.isDebugEnabled()) {
LOG.debug("Region open journal:\n" + status.prettyPrintJournal());
}
status.cleanup();
}
}
@ -1545,7 +1550,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
MonitoredTask status = TaskMonitor.get().createStatus(
"Closing region " + this.getRegionInfo().getEncodedName() +
(abort ? " due to abort" : ""));
status.enableStatusJournal(false);
status.enableStatusJournal(true);
status.setStatus("Waiting for close lock");
try {
synchronized (closeLock) {