public class VectorMapJoinFastTableContainer extends Object implements VectorMapJoinTableContainer, VectorMapJoinHashTable
MapJoinTableContainer.NonMatchedSmallTableIterator, MapJoinTableContainer.ReusableGetAdaptor| Constructor and Description |
|---|
VectorMapJoinFastTableContainer(MapJoinDesc desc,
org.apache.hadoop.conf.Configuration hconf,
long estimatedKeys,
int numHTs) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the contents of the table.
|
boolean |
containsLongKey(long currentKey) |
MapJoinTableContainer.ReusableGetAdaptor |
createGetter(MapJoinKey keyTypeFromLoader)
Creates reusable get adaptor that can be used to retrieve rows from the table
based on either vectorized or non-vectorized input rows to MapJoinOperator.
|
MatchTracker |
createMatchTracker() |
VectorMapJoinNonMatchedIterator |
createNonMatchedIterator(MatchTracker matchTracker) |
MapJoinTableContainer.NonMatchedSmallTableIterator |
createNonMatchedSmallTableIterator(MatchTracker matchTracker)
Creates an iterator for going through the hash table and returns the key and value rows for any
non-matched keys.
|
void |
dumpMetrics() |
MapJoinKey |
getAnyKey() |
long |
getEstimatedMemorySize() |
long |
getHashCode(org.apache.hadoop.io.BytesWritable currentKey) |
String |
getKey()
Return the assigned key.
|
boolean |
hasSpill()
Checks if the container has spilled any data onto disk.
|
void |
putRow(long hashCode,
org.apache.hadoop.io.BytesWritable currentKey,
org.apache.hadoop.io.BytesWritable currentValue) |
MapJoinKey |
putRow(org.apache.hadoop.io.Writable currentKey,
org.apache.hadoop.io.Writable currentValue)
Adds row from input to the table.
|
void |
seal()
Indicates to the container that the puts have ended; table is now r/o.
|
void |
setKey(String key)
Assign a key to the container, which can be used to cache it.
|
void |
setSerde(MapJoinObjectSerDeContext keyCtx,
MapJoinObjectSerDeContext valCtx) |
int |
size()
Return the size of the hash table.
|
int |
spillPartitionId() |
VectorMapJoinHashTable |
vectorMapJoinHashTable() |
public VectorMapJoinFastTableContainer(MapJoinDesc desc, org.apache.hadoop.conf.Configuration hconf, long estimatedKeys, int numHTs) throws SerDeException
SerDeExceptionpublic VectorMapJoinHashTable vectorMapJoinHashTable()
vectorMapJoinHashTable in interface VectorMapJoinTableContainerpublic void setKey(String key)
MapJoinTableContainersetKey in interface MapJoinTableContainerpublic String getKey()
MapJoinTableContainergetKey in interface MapJoinTableContainerpublic long getHashCode(org.apache.hadoop.io.BytesWritable currentKey)
throws HiveException,
IOException
HiveExceptionIOExceptionpublic MapJoinKey putRow(org.apache.hadoop.io.Writable currentKey, org.apache.hadoop.io.Writable currentValue) throws SerDeException, HiveException, IOException
MapJoinTableContainerputRow in interface MapJoinTableContainerSerDeExceptionHiveExceptionIOExceptionpublic void putRow(long hashCode,
org.apache.hadoop.io.BytesWritable currentKey,
org.apache.hadoop.io.BytesWritable currentValue)
throws SerDeException,
HiveException,
IOException
putRow in interface VectorMapJoinHashTablehashCode - current HashCode to avoid re-computationcurrentKey - The current Key in bytescurrentValue - The current Value in bytesSerDeExceptionHiveExceptionIOExceptionpublic void seal()
MapJoinTableContainerseal in interface MapJoinTableContainerpublic MapJoinTableContainer.ReusableGetAdaptor createGetter(MapJoinKey keyTypeFromLoader)
MapJoinTableContainercreateGetter in interface MapJoinTableContainerkeyTypeFromLoader - Last key from hash table loader, to determine key type used
when loading hashtable (if it can vary).public MapJoinTableContainer.NonMatchedSmallTableIterator createNonMatchedSmallTableIterator(MatchTracker matchTracker)
MapJoinTableContainercreateNonMatchedSmallTableIterator in interface MapJoinTableContainerpublic void clear()
MapJoinTableContainerclear in interface MapJoinTableContainerpublic MapJoinKey getAnyKey()
getAnyKey in interface MapJoinTableContainerpublic void dumpMetrics()
dumpMetrics in interface MapJoinTableContainerpublic boolean hasSpill()
MapJoinTableContainerhasSpill in interface MapJoinTableContainerpublic boolean containsLongKey(long currentKey)
containsLongKey in interface VectorMapJoinHashTablecurrentKey - The key to check for existence.public int size()
MapJoinTableContainersize in interface MapJoinTableContainersize in interface VectorMapJoinHashTablepublic MatchTracker createMatchTracker()
createMatchTracker in interface VectorMapJoinHashTablepublic VectorMapJoinNonMatchedIterator createNonMatchedIterator(MatchTracker matchTracker)
createNonMatchedIterator in interface VectorMapJoinHashTablepublic int spillPartitionId()
spillPartitionId in interface VectorMapJoinHashTablepublic long getEstimatedMemorySize()
getEstimatedMemorySize in interface MemoryEstimatepublic void setSerde(MapJoinObjectSerDeContext keyCtx, MapJoinObjectSerDeContext valCtx) throws SerDeException
setSerde in interface MapJoinTableContainerSerDeExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.