| Modifier and Type | Class and Description |
|---|---|
class |
HashTableTemplate.BatchHolder |
HashTable.PutStatusBATCH_MASK, BATCH_SIZE, DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, MAXIMUM_CAPACITY, TEMPLATE_DEFINITION| Constructor and Description |
|---|
HashTableTemplate() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
int |
containsKey(int incomingRowIdx,
boolean isProbe) |
protected abstract void |
doSetup(RecordBatch incomingBuild,
RecordBatch incomingProbe) |
protected abstract int |
getHashBuild(int incomingRowIdx) |
int |
getHashCode(int incomingRowIdx) |
protected abstract int |
getHashProbe(int incomingRowIdx) |
void |
getStats(HashTableStats stats) |
boolean |
isEmpty() |
protected HashTableTemplate.BatchHolder |
newBatchHolder(int index) |
int |
numBuckets() |
int |
numResizing() |
boolean |
outputKeys(int batchIdx,
VectorContainer outContainer,
int outStartIndex,
int numRecords,
int numExpectedRecords) |
HashTable.PutStatus |
put(int incomingRowIdx,
IndexPointer htIdxHolder,
int hashCode)
put() uses the hash code (from gethashCode() above) to insert the key(s) from the incoming
row into the hash table.
|
void |
reinit(RecordBatch newIncoming) |
void |
reset()
Reinit the hash table to its original size, and clear up all its prior batch holder
|
void |
setMaxVarcharSize(int size) |
void |
setup(HashTableConfig htConfig,
FragmentContext context,
BufferAllocator allocator,
RecordBatch incomingBuild,
RecordBatch incomingProbe,
RecordBatch outgoing,
VectorContainer htContainerOrig) |
int |
size() |
void |
updateBatches() |
public void setup(HashTableConfig htConfig, FragmentContext context, BufferAllocator allocator, RecordBatch incomingBuild, RecordBatch incomingProbe, RecordBatch outgoing, VectorContainer htContainerOrig)
public void updateBatches()
throws SchemaChangeException
updateBatches in interface HashTableSchemaChangeExceptionpublic int numBuckets()
public int numResizing()
public void getStats(HashTableStats stats)
public int getHashCode(int incomingRowIdx)
throws SchemaChangeException
getHashCode in interface HashTableSchemaChangeExceptionpublic HashTable.PutStatus put(int incomingRowIdx, IndexPointer htIdxHolder, int hashCode) throws SchemaChangeException, RetryAfterSpillException
put in interface HashTableincomingRowIdx - - position of the incoming rowhtIdxHolder - - to return batch + batch-offset (for caller to manage a matching batch)hashCode - - computed over the key(s) by calling getHashCode()SchemaChangeExceptionRetryAfterSpillExceptionpublic int containsKey(int incomingRowIdx,
boolean isProbe)
throws SchemaChangeException
containsKey in interface HashTableSchemaChangeExceptionprotected HashTableTemplate.BatchHolder newBatchHolder(int index)
public void reset()
public void reinit(RecordBatch newIncoming)
public boolean outputKeys(int batchIdx,
VectorContainer outContainer,
int outStartIndex,
int numRecords,
int numExpectedRecords)
outputKeys in interface HashTablepublic void setMaxVarcharSize(int size)
setMaxVarcharSize in interface HashTableprotected abstract void doSetup(@Named(value="incomingBuild")
RecordBatch incomingBuild,
@Named(value="incomingProbe")
RecordBatch incomingProbe)
throws SchemaChangeException
SchemaChangeExceptionprotected abstract int getHashBuild(@Named(value="incomingRowIdx")
int incomingRowIdx)
throws SchemaChangeException
SchemaChangeExceptionprotected abstract int getHashProbe(@Named(value="incomingRowIdx")
int incomingRowIdx)
throws SchemaChangeException
SchemaChangeExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.