Search in sources :

Example 1 with FakeKafkaTopicClient

use of io.confluent.ksql.util.FakeKafkaTopicClient in project ksql by confluentinc.

the class KsqlBareOutputNodeTest method build.

private SchemaKStream build() {
    final String simpleSelectFilter = "SELECT col0, col2, col3 FROM test1 WHERE col0 > 100;";
    final KsqlBareOutputNode planNode = (KsqlBareOutputNode) planBuilder.buildLogicalPlan(simpleSelectFilter);
    return planNode.buildStream(builder, new KsqlConfig(Collections.emptyMap()), new FakeKafkaTopicClient(), new FunctionRegistry(), new HashMap<>(), new MockSchemaRegistryClient());
}
Also used : FunctionRegistry(io.confluent.ksql.function.FunctionRegistry) MockSchemaRegistryClient(io.confluent.kafka.schemaregistry.client.MockSchemaRegistryClient) FakeKafkaTopicClient(io.confluent.ksql.util.FakeKafkaTopicClient) KsqlConfig(io.confluent.ksql.util.KsqlConfig)

Example 2 with FakeKafkaTopicClient

use of io.confluent.ksql.util.FakeKafkaTopicClient in project ksql by confluentinc.

the class PhysicalPlanBuilderTest method buildPhysicalPlanBuilder.

private PhysicalPlanBuilder buildPhysicalPlanBuilder(Map<String, Object> overrideProperties) {
    final StreamsBuilder streamsBuilder = new StreamsBuilder();
    final FunctionRegistry functionRegistry = new FunctionRegistry();
    Map<String, Object> configMap = new HashMap<>();
    configMap.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
    configMap.put("application.id", "KSQL");
    configMap.put("commit.interval.ms", 0);
    configMap.put("cache.max.bytes.buffering", 0);
    configMap.put("auto.offset.reset", "earliest");
    return new PhysicalPlanBuilder(streamsBuilder, new KsqlConfig(configMap), new FakeKafkaTopicClient(), functionRegistry, overrideProperties, false, metaStore, new MockSchemaRegistryClient(), testKafkaStreamsBuilder);
}
Also used : StreamsBuilder(org.apache.kafka.streams.StreamsBuilder) FunctionRegistry(io.confluent.ksql.function.FunctionRegistry) HashMap(java.util.HashMap) MockSchemaRegistryClient(io.confluent.kafka.schemaregistry.client.MockSchemaRegistryClient) FakeKafkaTopicClient(io.confluent.ksql.util.FakeKafkaTopicClient) KsqlConfig(io.confluent.ksql.util.KsqlConfig)

Aggregations

MockSchemaRegistryClient (io.confluent.kafka.schemaregistry.client.MockSchemaRegistryClient)2 FunctionRegistry (io.confluent.ksql.function.FunctionRegistry)2 FakeKafkaTopicClient (io.confluent.ksql.util.FakeKafkaTopicClient)2 KsqlConfig (io.confluent.ksql.util.KsqlConfig)2 HashMap (java.util.HashMap)1 StreamsBuilder (org.apache.kafka.streams.StreamsBuilder)1