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 05bb0d6a050..8f5535e8760 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 @@ -98,6 +98,9 @@ public class TableScanResource extends ResourceBase { kv.getTimestamp(), CellUtil.cloneValue(kv))); } count--; + if (count == 0) { + results.close(); + } return rModel; } };