Search in sources :

Example 1 with CountVectorCollectorTestOperator

use of org.apache.hadoop.hive.ql.exec.util.collectoroperator.CountVectorCollectorTestOperator in project hive by apache.

the class AbstractMapJoin method setupBenchmarkImplementation.

protected static MapJoinOperator setupBenchmarkImplementation(MapJoinTestImplementation mapJoinImplementation, MapJoinTestDescription testDesc, MapJoinTestData testData) throws Exception {
    MapJoinDesc mapJoinDesc = MapJoinTestConfig.createMapJoinDesc(testDesc);
    final boolean isVectorOutput = isVectorOutput(mapJoinImplementation);
    // This collector is just a row counter.
    Operator<? extends OperatorDesc> testCollectorOperator = (!isVectorOutput ? new CountCollectorTestOperator() : new CountVectorCollectorTestOperator());
    CreateMapJoinResult createMapJoinResult = MapJoinTestConfig.createMapJoinImplementation(mapJoinImplementation, testDesc, testData, mapJoinDesc, /* shareMapJoinTableContainer */
    null);
    MapJoinOperator operator = createMapJoinResult.mapJoinOperator;
    MapJoinTableContainer mapJoinTableContainer = createMapJoinResult.mapJoinTableContainer;
    // Invoke initializeOp methods.
    operator.initialize(testDesc.hiveConf, testDesc.inputObjectInspectors);
    // Fixup the mapJoinTables.
    operator.setTestMapJoinTableContainer(1, mapJoinTableContainer, null);
    return operator;
}
Also used : MapJoinOperator(org.apache.hadoop.hive.ql.exec.MapJoinOperator) MapJoinDesc(org.apache.hadoop.hive.ql.plan.MapJoinDesc) CountCollectorTestOperator(org.apache.hadoop.hive.ql.exec.util.collectoroperator.CountCollectorTestOperator) CountVectorCollectorTestOperator(org.apache.hadoop.hive.ql.exec.util.collectoroperator.CountVectorCollectorTestOperator) CreateMapJoinResult(org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestConfig.CreateMapJoinResult) MapJoinTableContainer(org.apache.hadoop.hive.ql.exec.persistence.MapJoinTableContainer)

Aggregations

MapJoinOperator (org.apache.hadoop.hive.ql.exec.MapJoinOperator)1 MapJoinTableContainer (org.apache.hadoop.hive.ql.exec.persistence.MapJoinTableContainer)1 CountCollectorTestOperator (org.apache.hadoop.hive.ql.exec.util.collectoroperator.CountCollectorTestOperator)1 CountVectorCollectorTestOperator (org.apache.hadoop.hive.ql.exec.util.collectoroperator.CountVectorCollectorTestOperator)1 CreateMapJoinResult (org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestConfig.CreateMapJoinResult)1 MapJoinDesc (org.apache.hadoop.hive.ql.plan.MapJoinDesc)1