use of org.apache.drill.exec.physical.impl.OperatorCreatorRegistry in project drill by apache.
the class ExecTest method mockDrillbitContext.
protected void mockDrillbitContext(final DrillbitContext bitContext) throws Exception {
new NonStrictExpectations() {
{
bitContext.getMetrics();
result = new MetricRegistry();
bitContext.getAllocator();
result = RootAllocatorFactory.newRoot(c);
bitContext.getOperatorCreatorRegistry();
result = new OperatorCreatorRegistry(ClassPathScanner.fromPrescan(c));
bitContext.getConfig();
result = c;
bitContext.getOptionManager();
result = optionManager;
bitContext.getCompiler();
result = CodeCompilerTestFactory.getTestCompiler(c);
}
};
}
use of org.apache.drill.exec.physical.impl.OperatorCreatorRegistry in project drill by axbaretto.
the class ExecTest method mockDrillbitContext.
protected DrillbitContext mockDrillbitContext() throws Exception {
final DrillbitContext context = mock(DrillbitContext.class);
when(context.getMetrics()).thenReturn(new MetricRegistry());
when(context.getAllocator()).thenReturn(RootAllocatorFactory.newRoot(c));
when(context.getOperatorCreatorRegistry()).thenReturn(new OperatorCreatorRegistry(ClassPathScanner.fromPrescan(c)));
when(context.getConfig()).thenReturn(c);
when(context.getOptionManager()).thenReturn(optionManager);
when(context.getCompiler()).thenReturn(CodeCompilerTestFactory.getTestCompiler(c));
return context;
}
use of org.apache.drill.exec.physical.impl.OperatorCreatorRegistry in project drill by apache.
the class ExecTest method mockDrillbitContext.
protected DrillbitContext mockDrillbitContext() throws Exception {
final DrillbitContext context = mock(DrillbitContext.class);
when(context.getMetrics()).thenReturn(new MetricRegistry());
when(context.getAllocator()).thenReturn(RootAllocatorFactory.newRoot(c));
when(context.getOperatorCreatorRegistry()).thenReturn(new OperatorCreatorRegistry(ClassPathScanner.fromPrescan(c)));
when(context.getConfig()).thenReturn(c);
when(context.getOptionManager()).thenReturn(optionManager);
when(context.getCompiler()).thenReturn(CodeCompilerTestFactory.getTestCompiler(c));
return context;
}
Aggregations