@InterfaceAudience.Private public class ArraySearcherPool extends Object
Pools PrefixTreeArraySearcher objects. Each Searcher can consist of hundreds or thousands of objects and 1 is needed for each HFile during a Get operation. With tens of thousands of Gets/second, reusing these searchers may save a lot of young gen collections.
Alternative implementation would be a ByteBufferSearcherPool (not implemented yet).Modifier and Type | Field and Description |
---|---|
protected Queue<PrefixTreeArraySearcher> |
pool |
Constructor and Description |
---|
ArraySearcherPool() |
Modifier and Type | Method and Description |
---|---|
void |
checkIn(PrefixTreeArraySearcher searcher) |
PrefixTreeArraySearcher |
checkOut(ByteBuffer buffer,
boolean includesMvccVersion) |
String |
toString() |
protected Queue<PrefixTreeArraySearcher> pool
public PrefixTreeArraySearcher checkOut(ByteBuffer buffer, boolean includesMvccVersion)
public void checkIn(PrefixTreeArraySearcher searcher)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.