HBASE-16090 ResultScanner is not closed in SyncTable#finishRemainingHashRanges()
This commit is contained in:
parent
d66316fd80
commit
9cd097cfac
|
@ -655,9 +655,16 @@ public class SyncTable extends Configured implements Tool {
|
|||
scan.setStopRow(nextSourceKey.copyBytes());
|
||||
}
|
||||
|
||||
ResultScanner targetScanner = targetTable.getScanner(scan);
|
||||
for (Result row : targetScanner) {
|
||||
targetHasher.hashResult(row);
|
||||
ResultScanner targetScanner = null;
|
||||
try {
|
||||
targetScanner = targetTable.getScanner(scan);
|
||||
for (Result row : targetScanner) {
|
||||
targetHasher.hashResult(row);
|
||||
}
|
||||
} finally {
|
||||
if (targetScanner != null) {
|
||||
targetScanner.close();
|
||||
}
|
||||
}
|
||||
} // else current batch ends exactly at split end row
|
||||
|
||||
|
|
Loading…
Reference in New Issue