use of io.confluent.ksql.rest.server.resources.streaming.PushQueryConfigRoutingOptions 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);
}
Aggregations