public class HashMapWrapper extends AbstractMapJoinTableContainer implements Serializable
MapJoinTableContainer.ReusableGetAdaptor| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG |
LOAD_NAME, THESHOLD_NAME| Constructor and Description |
|---|
HashMapWrapper() |
HashMapWrapper(org.apache.hadoop.conf.Configuration hconf,
long keyCount) |
HashMapWrapper(Map<String,String> metaData) |
| Modifier and Type | Method and Description |
|---|---|
static int |
calculateTableSize(float keyCountAdj,
int threshold,
float loadFactor,
long keyCount) |
void |
clear()
Clears the contents of the table.
|
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.
|
void |
dumpMetrics() |
Set<Map.Entry<MapJoinKey,MapJoinRowContainer>> |
entrySet() |
MapJoinRowContainer |
get(MapJoinKey key) |
MapJoinKey |
getAnyKey() |
long |
getEstimatedMemorySize()
Returns estimated memory size based
JavaDataModel |
boolean |
hasSpill()
Checks if the container has spilled any data onto disk.
|
void |
put(MapJoinKey key,
MapJoinRowContainer value) |
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 |
setSerde(MapJoinObjectSerDeContext keyCtx,
MapJoinObjectSerDeContext valCtx) |
int |
size()
Return the size of the hash table
|
createConstructorMetaData, getMetaData, putMetaDatapublic HashMapWrapper()
public HashMapWrapper(org.apache.hadoop.conf.Configuration hconf,
long keyCount)
public static int calculateTableSize(float keyCountAdj,
int threshold,
float loadFactor,
long keyCount)
public MapJoinRowContainer get(MapJoinKey key)
get in interface MapJoinPersistableTableContainerpublic void put(MapJoinKey key, MapJoinRowContainer value)
put in interface MapJoinPersistableTableContainerpublic int size()
MapJoinTableContainersize in interface MapJoinPersistableTableContainersize in interface MapJoinTableContainerpublic Set<Map.Entry<MapJoinKey,MapJoinRowContainer>> entrySet()
entrySet in interface MapJoinPersistableTableContainerpublic void clear()
MapJoinTableContainerclear in interface MapJoinTableContainerpublic MapJoinKey putRow(org.apache.hadoop.io.Writable currentKey, org.apache.hadoop.io.Writable currentValue) throws SerDeException, HiveException
MapJoinTableContainerputRow in interface MapJoinTableContainerSerDeExceptionHiveExceptionpublic 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 long getEstimatedMemorySize()
MemoryEstimateJavaDataModelgetEstimatedMemorySize in interface MemoryEstimatepublic void seal()
MapJoinTableContainerseal in interface MapJoinTableContainerpublic MapJoinKey getAnyKey()
getAnyKey in interface MapJoinTableContainerpublic void dumpMetrics()
dumpMetrics in interface MapJoinTableContainerpublic boolean hasSpill()
MapJoinTableContainerhasSpill in interface MapJoinTableContainerpublic void setSerde(MapJoinObjectSerDeContext keyCtx, MapJoinObjectSerDeContext valCtx) throws SerDeException
setSerde in interface MapJoinTableContainerSerDeExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.