Search in sources :

Example 1 with VectorMapJoinFastHashTableLoader

use of org.apache.hadoop.hive.ql.exec.vector.mapjoin.fast.VectorMapJoinFastHashTableLoader in project hive by apache.

the class VectorMapJoinCommonOperator method getHashTableLoader.

/**
 * This override lets us substitute our own fast vectorized hash table loader.
 */
@Override
protected HashTableLoader getHashTableLoader(Configuration hconf) {
    HashTableImplementationType hashTableImplementationType = vectorDesc.getHashTableImplementationType();
    HashTableLoader hashTableLoader;
    switch(vectorDesc.getHashTableImplementationType()) {
        case OPTIMIZED:
            // Use the Tez hash table loader.
            hashTableLoader = HashTableLoaderFactory.getLoader(hconf);
            break;
        case FAST:
            // Use our specialized hash table loader.
            hashTableLoader = HiveConf.getVar(hconf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("spark") ? HashTableLoaderFactory.getLoader(hconf) : new VectorMapJoinFastHashTableLoader();
            break;
        default:
            throw new RuntimeException("Unknown vector map join hash table implementation type " + hashTableImplementationType.name());
    }
    return hashTableLoader;
}
Also used : HashTableImplementationType(org.apache.hadoop.hive.ql.plan.VectorMapJoinDesc.HashTableImplementationType) HashTableLoader(org.apache.hadoop.hive.ql.exec.HashTableLoader) VectorMapJoinFastHashTableLoader(org.apache.hadoop.hive.ql.exec.vector.mapjoin.fast.VectorMapJoinFastHashTableLoader) VectorMapJoinFastHashTableLoader(org.apache.hadoop.hive.ql.exec.vector.mapjoin.fast.VectorMapJoinFastHashTableLoader)

Aggregations

HashTableLoader (org.apache.hadoop.hive.ql.exec.HashTableLoader)1 VectorMapJoinFastHashTableLoader (org.apache.hadoop.hive.ql.exec.vector.mapjoin.fast.VectorMapJoinFastHashTableLoader)1 HashTableImplementationType (org.apache.hadoop.hive.ql.plan.VectorMapJoinDesc.HashTableImplementationType)1