diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 75959b5061b..1d12bd1fb59 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -2739,8 +2739,9 @@ public class HRegion implements HeapSize { // , Writable{ MonitoredTask status = TaskMonitor.get().createStatus(msg); status.setStatus("Opening logs"); - HLog.Reader reader = HLog.getReader(this.fs, edits, conf); + HLog.Reader reader = null; try { + reader = HLog.getReader(this.fs, edits, conf); long currentEditSeqId = minSeqId; long firstSeqIdInLog = -1; long skippedEdits = 0; @@ -2871,8 +2872,10 @@ public class HRegion implements HeapSize { // , Writable{ LOG.debug(msg); return currentEditSeqId; } finally { - reader.close(); status.cleanup(); + if (reader != null) { + reader.close(); + } } }