Ted Yu created HBASE-10369:
------------------------------
Summary: LabelExpander#createLabels() should close scanner in
finally clause
Key: HBASE-10369
URL: https://issues.apache.org/jira/browse/HBASE-10369
Project: HBase
Issue Type: Bug
Reporter: Ted Yu
Priority: Minor
Here is related code:
{code}
while (true) {
Result next = scanner.next();
if (next == null) {
break;
}
byte[] row = next.getRow();
byte[] value = next.getValue(LABELS_TABLE_FAMILY, LABEL_QUALIFIER);
labels.put(Bytes.toString(value), Bytes.toInt(row));
}
scanner.close();
} finally {
{code}
If scanner.next() throws exception, scanner would be left open.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)