Package org.apache.drill.exec.store.hive
Class HivePartitionHolder
java.lang.Object
org.apache.drill.exec.store.hive.HivePartitionHolder
Helper class that stores partition values per key.
Key to index mapper contains key and index corresponding to partition values position in partition values list.
Since several keys may have that same partition values, such structure is optimized to save memory usage.
Partition values are stored in list of consecutive values.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks if partition values already exist in holder.get
(org.apache.hadoop.fs.Path key) Returns list of partition values stored in holder for the given key.
-
Constructor Details
-
HivePartitionHolder
-
HivePartitionHolder
public HivePartitionHolder()
-
-
Method Details
-
getKeyToIndexMapper
-
getPartitionValues
-
add
Checks if partition values already exist in holder. If not, adds them to holder and adds key and index corresponding to partition values to mapper. If partition values exist, adds key and existing partition values index to mapper.- Parameters:
key
- mapper keyvalues
- partition values
-
get
Returns list of partition values stored in holder for the given key. If there are no corresponding partition values, return empty list.- Parameters:
key
- mapper key- Returns:
- list of partition values
-