org.apache.hadoop.hive.ql.exec.persistence
Class HashMapWrapper
java.lang.Object
org.apache.hadoop.hive.ql.exec.persistence.AbstractMapJoinTableContainer
org.apache.hadoop.hive.ql.exec.persistence.HashMapWrapper
- All Implemented Interfaces:
- Serializable, MapJoinTableContainer
public class HashMapWrapper
- extends AbstractMapJoinTableContainer
- implements Serializable
Simple wrapper for persistent Hashmap implementing only the put/get/remove/clear interface. The
main memory hash table acts as a cache and all put/get will operate on it first. If the size of
the main memory hash table exceeds a certain threshold, new elements will go into the persistent
hash table.
- See Also:
- Serialized Form
Field Summary |
protected static org.apache.commons.logging.Log |
LOG
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.apache.commons.logging.Log LOG
HashMapWrapper
public HashMapWrapper(int threshold,
float loadFactor)
- Constructor.
- Parameters:
threshold
- User specified threshold to store new values into persistent storage.
HashMapWrapper
public HashMapWrapper(Map<String,String> metaData)
HashMapWrapper
public HashMapWrapper(int threshold)
HashMapWrapper
public HashMapWrapper()
get
public MapJoinRowContainer get(MapJoinKey key)
- Specified by:
get
in interface MapJoinTableContainer
put
public void put(MapJoinKey key,
MapJoinRowContainer value)
- Specified by:
put
in interface MapJoinTableContainer
size
public int size()
- Specified by:
size
in interface MapJoinTableContainer
entrySet
public Set<Map.Entry<MapJoinKey,MapJoinRowContainer>> entrySet()
- Specified by:
entrySet
in interface MapJoinTableContainer
clear
public void clear()
- Specified by:
clear
in interface MapJoinTableContainer
Copyright © 2012 The Apache Software Foundation