@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 |
---|---|
private static Integer |
MAX_POOL_SIZE
One decoder is needed for each storefile for each Get operation so we may need hundreds at the
same time, however, decoding is a CPU bound activity so should limit this to something in the
realm of maximum reasonable active threads.
|
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() |
private static final Integer MAX_POOL_SIZE
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.