hongbin ma created KYLIN-688:
--------------------------------
Summary: possible memory leak for segmentIterator
Key: KYLIN-688
URL: https://issues.apache.org/jira/browse/KYLIN-688
Project: Kylin
Issue Type: Bug
Components: Storage - HBase
Affects Versions: v0.6.5, v0.7.1, v0.8.1
Reporter: hongbin ma
Assignee: hongbin ma
SerializedHBaseTupleIterator:
@Override
public ITuple next() {
//TODO: last not closed
ITuple t = null;
while (hasNext()) {
if (segmentIterator.hasNext()) {
t = segmentIterator.next();
scanCount++;
break;
} else {
try {
segmentIterator.close();
} catch (IOException e) {
e.printStackTrace();
}
segmentIterator = segmentIteratorIterator.next();
}
}
return t;
}
=======================
currently segmentIterator is closed only when segmentIterator.hasNext() returns
false. the last segmentIterator will never reach here because the outer
while(hasNext()) would exit the whole loop first.
What's more, due to the complexity of "while(hasNext())", even non-last
segmentIterator might not get the chance to be closed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)