HBASE-25626 Possible Resource Leak in HeterogeneousRegionCountCostFunction
Signed-off-by Anoop Sam John <anoopsamjohn@apache.org> Signed-off-by shahrs87 <shahrs87@gmail.com>
This commit is contained in:
parent
157200ef83
commit
e099ef349b
|
@ -221,11 +221,14 @@ public class HeterogeneousRegionCountCostFunction extends StochasticLoadBalancer
|
||||||
|
|
||||||
private List<String> readLines(BufferedReader reader) throws IOException {
|
private List<String> readLines(BufferedReader reader) throws IOException {
|
||||||
final List<String> records = new ArrayList<>();
|
final List<String> records = new ArrayList<>();
|
||||||
String line;
|
try {
|
||||||
while ((line = reader.readLine()) != null) {
|
String line;
|
||||||
records.add(line);
|
while ((line = reader.readLine()) != null) {
|
||||||
|
records.add(line);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
reader.close();
|
||||||
}
|
}
|
||||||
reader.close();
|
|
||||||
return records;
|
return records;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue