Search in sources :

Example 1 with PeekStreamOperator

use of io.confluent.ksql.physical.scalablepush.operators.PeekStreamOperator in project ksql by confluentinc.

the class PushPhysicalPlanBuilder method translateDataSourceNode.

private AbstractPhysicalOperator translateDataSourceNode(final DataSourceNode logicalNode, final Optional<PushOffsetRange> offsetRange, final String catchupConsumerGroupId) {
    final ScalablePushRegistry scalablePushRegistry = persistentQueryMetadata.getScalablePushRegistry().orElseThrow(() -> new IllegalStateException("Scalable push registry cannot be found"));
    querySourceType = logicalNode.isWindowed() ? QuerySourceType.WINDOWED : QuerySourceType.NON_WINDOWED;
    final Optional<CatchupMetadata> catchupMetadata = offsetRange.map(or -> new CatchupMetadata(or, catchupConsumerGroupId));
    return new PeekStreamOperator(scalablePushRegistry, logicalNode, queryId, catchupMetadata);
}
Also used : PeekStreamOperator(io.confluent.ksql.physical.scalablepush.operators.PeekStreamOperator) CatchupMetadata(io.confluent.ksql.physical.scalablepush.ScalablePushRegistry.CatchupMetadata)

Aggregations

CatchupMetadata (io.confluent.ksql.physical.scalablepush.ScalablePushRegistry.CatchupMetadata)1 PeekStreamOperator (io.confluent.ksql.physical.scalablepush.operators.PeekStreamOperator)1