Search in sources :

Example 1 with ExchangeOperatorFactory

use of com.facebook.presto.operator.ExchangeOperator.ExchangeOperatorFactory in project presto by prestodb.

the class TestExchangeOperator method createExchangeOperator.

private SourceOperator createExchangeOperator() {
    ExchangeOperatorFactory operatorFactory = new ExchangeOperatorFactory(0, new PlanNodeId("test"), new TaskExchangeClientManager(exchangeClientSupplier), SERDE_FACTORY);
    DriverContext driverContext = createTaskContext(scheduler, scheduledExecutor, TEST_SESSION).addPipelineContext(0, true, true, false).addDriverContext();
    SourceOperator operator = operatorFactory.createOperator(driverContext);
    assertEquals(operator.getOperatorContext().getOperatorStats().getSystemMemoryReservation().toBytes(), 0);
    return operator;
}
Also used : PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) ExchangeOperatorFactory(com.facebook.presto.operator.ExchangeOperator.ExchangeOperatorFactory)

Aggregations

ExchangeOperatorFactory (com.facebook.presto.operator.ExchangeOperator.ExchangeOperatorFactory)1 PlanNodeId (com.facebook.presto.spi.plan.PlanNodeId)1