use of org.apache.hadoop.hive.ql.exec.util.collectoroperator.CountCollectorTestOperator in project hive by apache.
the class TestMapJoinOperator method executeTestImplementation.
private void executeTestImplementation(MapJoinTestImplementation mapJoinImplementation, MapJoinTestDescription testDesc, MapJoinTestData testData, RowTestObjectsMultiSet expectedTestRowMultiSet) throws Exception {
System.out.println("*BENCHMARK* Starting " + mapJoinImplementation + " test");
// UNDONE: Parameterize for implementation variation?
MapJoinDesc mapJoinDesc = MapJoinTestConfig.createMapJoinDesc(testDesc);
final boolean isVectorOutput = isVectorOutput(mapJoinImplementation);
RowTestObjectsMultiSet outputTestRowMultiSet = new RowTestObjectsMultiSet();
Operator<? extends OperatorDesc> testCollectorOperator = (!isVectorOutput ? new TestMultiSetCollectorOperator(testDesc.outputObjectInspectors, outputTestRowMultiSet) : new TestMultiSetVectorCollectorOperator(testDesc.outputTypeInfos, testDesc.outputObjectInspectors, outputTestRowMultiSet));
MapJoinOperator operator = MapJoinTestConfig.createMapJoinImplementation(mapJoinImplementation, testDesc, testCollectorOperator, testData, mapJoinDesc);
if (!isVectorOutput) {
MapJoinTestData.driveBigTableData(testDesc, testData, operator);
} else {
MapJoinTestData.driveVectorBigTableData(testDesc, testData, operator);
}
System.out.println("*BENCHMARK* executeTestImplementation row count " + ((CountCollectorTestOperator) testCollectorOperator).getRowCount());
// Verify the output!
if (!expectedTestRowMultiSet.verify(outputTestRowMultiSet)) {
System.out.println("*BENCHMARK* verify failed for " + mapJoinImplementation);
} else {
System.out.println("*BENCHMARK* verify succeeded for " + mapJoinImplementation);
}
}
use of org.apache.hadoop.hive.ql.exec.util.collectoroperator.CountCollectorTestOperator in project hive by apache.
the class AbstractMapJoin method setupBenchmarkImplementation.
protected static MapJoinOperator setupBenchmarkImplementation(MapJoinTestImplementation mapJoinImplementation, MapJoinTestDescription testDesc, MapJoinTestData testData) throws Exception {
// UNDONE: Parameterize for implementation variation?
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());
MapJoinOperator operator = MapJoinTestConfig.createMapJoinImplementation(mapJoinImplementation, testDesc, testCollectorOperator, testData, mapJoinDesc);
return operator;
}
Aggregations