Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Adds a new config check to insert SPQ Processor #8062

Merged
merged 4 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,13 @@ public class KsqlConfig extends AbstractConfig {
+ "functions, aggregations, or joins, but may include projections and filters.";
public static final boolean KSQL_QUERY_PUSH_SCALABLE_ENABLED_DEFAULT = false;

public static final String KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED
= "ksql.query.push.scalable.registry.installed";
public static final String KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED_DOC =
"Enables whether scalable push registry should be installed. This is a requirement of "
+ "enabling scalable push queries using ksql.query.push.scalable.enabled.";
public static final boolean KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED_DEFAULT = false;

public static final String KSQL_QUERY_PUSH_SCALABLE_NEW_NODE_CONTINUITY
= "ksql.query.push.scalable.new.node.continuity";
public static final String KSQL_QUERY_PUSH_SCALABLE_NEW_NODE_CONTINUITY_DOC =
Expand Down Expand Up @@ -923,6 +930,13 @@ private static ConfigDef buildConfigDef(final ConfigGeneration generation) {
Importance.LOW,
KSQL_QUERY_PUSH_SCALABLE_ENABLED_DOC
)
.define(
KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED,
Type.BOOLEAN,
KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED_DEFAULT,
Importance.LOW,
KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED_DOC
)
.define(
KSQL_QUERY_PUSH_SCALABLE_NEW_NODE_CONTINUITY,
Type.BOOLEAN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
public class ProcessingQueue {

static final int BLOCKING_QUEUE_CAPACITY = 100;
static final int BLOCKING_QUEUE_CAPACITY = 1000;

private final Deque<TableRow> rowQueue;
private final QueryId queryId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private static Optional<ScalablePushRegistry> applyScalablePushProcessor(
final Map<String, Object> streamsProperties,
final KsqlConfig ksqlConfig
) {
if (!ksqlConfig.getBoolean(KsqlConfig.KSQL_QUERY_PUSH_SCALABLE_ENABLED)) {
if (!ksqlConfig.getBoolean(KsqlConfig.KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED)) {
return Optional.empty();
}
final KStream<?, GenericRow> stream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public class RestQueryTranslationTest {
.withProperty(KsqlConfig.SCHEMA_REGISTRY_URL_PROPERTY, "set")
.withProperty(KsqlConfig.KSQL_QUERY_PULL_TABLE_SCAN_ENABLED, true)
.withProperty(KsqlConfig.KSQL_QUERY_PULL_INTERPRETER_ENABLED, true)
.withProperty(KsqlConfig.KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED, true)
.withProperty(KsqlConfig.KSQL_QUERY_PUSH_SCALABLE_ENABLED, true)
.withStaticServiceContext(TEST_HARNESS::getServiceContext)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ public class RestApiTest {
.withProperty("sasl.mechanism", "PLAIN")
.withProperty("sasl.jaas.config", SecureKafkaHelper.buildJaasConfig(NORMAL_USER))
.withProperties(ClientTrustStore.trustStoreProps())
.withProperty(KsqlConfig.KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED, true)
.withProperty(KsqlConfig.KSQL_QUERY_PUSH_SCALABLE_ENABLED, true)
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public class ScalablePushQueryFunctionalTest {
.withProperty(KsqlRestConfig.LISTENERS_CONFIG, "http://localhost:8088")
.withProperty(KsqlRestConfig.ADVERTISED_LISTENER_CONFIG, "http://localhost:8088")
.withProperty(KsqlConfig.KSQL_QUERY_PULL_ENABLE_STANDBY_READS, true)
.withProperty(KsqlConfig.KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED, true)
.withProperty(KsqlConfig.KSQL_QUERY_PUSH_SCALABLE_ENABLED, true)
// Make rebalances happen quicker for the sake of the test
.withProperty(KSQL_STREAMS_PREFIX + "max.poll.interval.ms", 5000)
Expand All @@ -112,6 +113,7 @@ public class ScalablePushQueryFunctionalTest {
.withProperty(KsqlRestConfig.LISTENERS_CONFIG, "http://localhost:8089")
.withProperty(KsqlRestConfig.ADVERTISED_LISTENER_CONFIG, "http://localhost:8089")
.withProperty(KsqlConfig.KSQL_QUERY_PULL_ENABLE_STANDBY_READS, true)
.withProperty(KsqlConfig.KSQL_QUERY_PUSH_SCALABLE_REGISTRY_INSTALLED, true)
.withProperty(KsqlConfig.KSQL_QUERY_PUSH_SCALABLE_ENABLED, true)
// Make rebalances happen quicker for the sake of the test
.withProperty(KSQL_STREAMS_PREFIX + "max.poll.interval.ms", 5000)
Expand Down