HBASE-10546 Two scanner objects are open for each hbase map task but only one scanner object is closed. (Vasu Mariyala)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1569500 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
larsh 2014-02-18 19:29:26 +00:00
parent fc59a1f66e
commit 6b81ac7c93
1 changed files with 6 additions and 0 deletions

View File

@ -81,6 +81,12 @@ public class TableRecordReaderImpl {
currentScan.setStartRow(firstRow);
currentScan.setAttribute(Scan.SCAN_ATTRIBUTES_METRICS_ENABLE,
Bytes.toBytes(Boolean.TRUE));
if (this.scanner != null) {
if (logScannerActivity) {
LOG.info("Closing the previously opened scanner object.");
}
this.scanner.close();
}
this.scanner = this.htable.getScanner(currentScan);
if (logScannerActivity) {
LOG.info("Current scan=" + currentScan.toString());