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
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
getAnyKey
public MapJoinKey getAnyKey()
- Specified by:
getAnyKey
in interface MapJoinTableContainer
Copyright © 2014 The Apache Software Foundation. All rights reserved.