diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableScanResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableScanResource.java index 3effc018d1e..b1f7eaccda2 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableScanResource.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableScanResource.java @@ -108,6 +108,9 @@ public class TableScanResource extends ResourceBase { kv.getTimestamp(), CellUtil.cloneValue(kv))); } count--; + if (count == 0) { + results.close(); + } return rModel; } };