Skip to content

Commit

Permalink
HBASE-23207 Log a region open journal (#751)
Browse files Browse the repository at this point in the history
Signed-off-by: Abhishek Singh Chouhan <[email protected]>
  • Loading branch information
apurtell committed Oct 24, 2019
1 parent ce65db3 commit f0999a1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ private long initialize(final CancelableProgressable reporter) throws IOExceptio
}

MonitoredTask status = TaskMonitor.get().createStatus("Initializing region " + this);
status.enableStatusJournal(true);
long nextSeqId = -1;
try {
nextSeqId = initializeRegionInternals(reporter, status);
Expand All @@ -900,6 +901,10 @@ private long initialize(final CancelableProgressable reporter) throws IOExceptio
status.abort("Exception during region " + getRegionInfo().getRegionNameAsString() +
" initialization.");
}
if (LOG.isDebugEnabled()) {
LOG.debug("Region open journal:\n" + status.prettyPrintJournal());
}
status.cleanup();
}
}

Expand Down Expand Up @@ -1488,7 +1493,7 @@ public Map<byte[], List<StoreFile>> close(final boolean abort) throws IOExceptio
MonitoredTask status = TaskMonitor.get().createStatus(
"Closing region " + this +
(abort ? " due to abort" : ""));
status.enableStatusJournal(false);
status.enableStatusJournal(true);
status.setStatus("Waiting for close lock");
try {
synchronized (closeLock) {
Expand Down

0 comments on commit f0999a1

Please sign in to comment.