use of com.facebook.presto.split.PageSinkManager in project presto by prestodb.
the class TaskTestUtils method createTestingPlanner.
public static LocalExecutionPlanner createTestingPlanner() {
MetadataManager metadata = MetadataManager.createTestMetadataManager();
PageSourceManager pageSourceManager = new PageSourceManager();
pageSourceManager.addConnectorPageSourceProvider(CONNECTOR_ID, new TestingPageSourceProvider());
// we don't start the finalizer so nothing will be collected, which is ok for a test
FinalizerService finalizerService = new FinalizerService();
NodeScheduler nodeScheduler = new NodeScheduler(new LegacyNetworkTopology(), new InMemoryNodeManager(), new NodeSchedulerConfig().setIncludeCoordinator(true), new NodeTaskMap(finalizerService));
NodePartitioningManager nodePartitioningManager = new NodePartitioningManager(nodeScheduler);
return new LocalExecutionPlanner(metadata, new SqlParser(), Optional.empty(), pageSourceManager, new IndexManager(), nodePartitioningManager, new PageSinkManager(), new MockExchangeClientSupplier(), new ExpressionCompiler(metadata), new JoinFilterFunctionCompiler(metadata), new IndexJoinLookupStats(), new CompilerConfig(), new TaskManagerConfig(), new BinarySpillerFactory(new BlockEncodingManager(metadata.getTypeManager()), new FeaturesConfig()), new TestingBlockEncodingSerde(new TestingTypeManager()), new PagesIndex.TestingFactory(), new JoinCompiler(), new LookupJoinOperators(new JoinProbeCompiler()));
}
use of com.facebook.presto.split.PageSinkManager in project presto by prestodb.
the class TestTableWriterOperator method createTableWriterOperator.
private Operator createTableWriterOperator(BlockingPageSink blockingPageSink) {
PageSinkManager pageSinkProvider = new PageSinkManager();
pageSinkProvider.addConnectorPageSinkProvider(CONNECTOR_ID, new ConstantPageSinkProvider(blockingPageSink));
TableWriterOperator.TableWriterOperatorFactory factory = new TableWriterOperator.TableWriterOperatorFactory(0, new PlanNodeId("test"), pageSinkProvider, new TableWriterNode.CreateHandle(new OutputTableHandle(CONNECTOR_ID, new ConnectorTransactionHandle() {
}, new ConnectorOutputTableHandle() {
}), new SchemaTableName("testSchema", "testTable")), ImmutableList.of(0), TEST_SESSION);
return factory.createOperator(createTaskContext(executor, TEST_SESSION).addPipelineContext(0, true, true).addDriverContext());
}
Aggregations