HBASE-21007 Memory leak in HBase REST server
Close the scanner leak in rest server when using the limit number of rows. Example: when using uris like /sometable/*?limit=5&startrow=eGlND&endrow=eGlNE where the scan range has more rows than the limit, the rest server will start leaking memmory. Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
parent
9d594ac86a
commit
ff89ec17c4
|
@ -98,6 +98,9 @@ public class TableScanResource extends ResourceBase {
|
|||
kv.getTimestamp(), CellUtil.cloneValue(kv)));
|
||||
}
|
||||
count--;
|
||||
if (count == 0) {
|
||||
results.close();
|
||||
}
|
||||
return rModel;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue