mirror of https://github.com/apache/druid.git
Merge pull request #2197 from metamx/clearIncIndexClose
Make OnHeapIncrementalIndex clean maps on close()
This commit is contained in:
commit
d0b10c29d7
|
@ -243,6 +243,18 @@ public class OnheapIncrementalIndex extends IncrementalIndex<Aggregator>
|
||||||
return concurrentGet(rowOffset)[aggOffset].get();
|
return concurrentGet(rowOffset)[aggOffset].get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear out maps to allow GC
|
||||||
|
* NOTE: This is NOT thread-safe with add... so make sure all the adding is DONE before closing
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void close()
|
||||||
|
{
|
||||||
|
super.close();
|
||||||
|
aggregators.clear();
|
||||||
|
facts.clear();
|
||||||
|
}
|
||||||
|
|
||||||
private static class OnHeapDimDim implements DimDim
|
private static class OnHeapDimDim implements DimDim
|
||||||
{
|
{
|
||||||
private final Map<String, Integer> falseIds;
|
private final Map<String, Integer> falseIds;
|
||||||
|
|
Loading…
Reference in New Issue