Search in sources :

Example 1 with PushQueryConfigPlannerOptions

use of io.confluent.ksql.rest.server.resources.streaming.PushQueryConfigPlannerOptions in project ksql by confluentinc.

the class QueryExecutor method handleScalablePushQuery.

private QueryMetadataHolder handleScalablePushQuery(final ImmutableAnalysis analysis, final ServiceContext serviceContext, final PreparedStatement<Query> statement, final Map<String, Object> configOverrides, final Map<String, Object> requestProperties, final Context context, final SlidingWindowRateLimiter scalablePushBandRateLimiter, final AtomicReference<ScalablePushQueryMetadata> resultForMetrics) {
    final ConfiguredStatement<Query> configured = ConfiguredStatement.of(statement, SessionConfig.of(ksqlConfig, configOverrides));
    final PushQueryConfigRoutingOptions routingOptions = new PushQueryConfigRoutingOptions(ksqlConfig, configOverrides, requestProperties);
    final PushQueryConfigPlannerOptions plannerOptions = new PushQueryConfigPlannerOptions(ksqlConfig, configOverrides);
    scalablePushBandRateLimiter.allow(KsqlQueryType.PUSH);
    final ScalablePushQueryMetadata query = ksqlEngine.executeScalablePushQuery(analysis, serviceContext, configured, pushRouting, routingOptions, plannerOptions, context, scalablePushQueryMetrics);
    query.prepare();
    resultForMetrics.set(query);
    QueryLogger.info("Streaming scalable push query", statement.getStatementText());
    return QueryMetadataHolder.of(query);
}
Also used : PushQueryConfigPlannerOptions(io.confluent.ksql.rest.server.resources.streaming.PushQueryConfigPlannerOptions) Query(io.confluent.ksql.parser.tree.Query) PushQueryConfigRoutingOptions(io.confluent.ksql.rest.server.resources.streaming.PushQueryConfigRoutingOptions) ScalablePushQueryMetadata(io.confluent.ksql.util.ScalablePushQueryMetadata)

Aggregations

Query (io.confluent.ksql.parser.tree.Query)1 PushQueryConfigPlannerOptions (io.confluent.ksql.rest.server.resources.streaming.PushQueryConfigPlannerOptions)1 PushQueryConfigRoutingOptions (io.confluent.ksql.rest.server.resources.streaming.PushQueryConfigRoutingOptions)1 ScalablePushQueryMetadata (io.confluent.ksql.util.ScalablePushQueryMetadata)1