target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testCloseIsIdempotent() throws Exception { streams.close(); final int closeCount = MockMetricsReporter.CLOSE_COUNT.get(); streams.close(); Assert.assertEquals("subsequent close() calls should do nothing", closeCount, MockMetricsReporter.CLOSE_COUNT.get()); }
public void close() { close(DEFAULT_CLOSE_TIMEOUT, TimeUnit.SECONDS); }
KafkaStreams { public void close() { close(DEFAULT_CLOSE_TIMEOUT, TimeUnit.SECONDS); } }
KafkaStreams { public void close() { close(DEFAULT_CLOSE_TIMEOUT, TimeUnit.SECONDS); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); }
KafkaStreams { public void close() { close(DEFAULT_CLOSE_TIMEOUT, TimeUnit.SECONDS); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
KafkaStreams { public void close() { close(DEFAULT_CLOSE_TIMEOUT, TimeUnit.SECONDS); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
@Test(expected = ConfigException.class) public void testConfigInvalidTargetType() { TimestampConverter<SourceRecord> xform = new TimestampConverter.Value<>(); xform.configure(Collections.singletonMap(TimestampConverter.TARGET_TYPE_CONFIG, "invalid")); }
@Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } @Override void configure(Map<String, ?> configs); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } @Override void configure(Map<String, ?> configs); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); static final String OVERVIEW_DOC; static final String FIELD_CONFIG; static final String TARGET_TYPE_CONFIG; static final String FORMAT_CONFIG; static final ConfigDef CONFIG_DEF; }
@Test public void testNumberDefaultMetrics() { final KafkaStreams streams = createKafkaStreams(); final Map<MetricName, ? extends Metric> metrics = streams.metrics(); assertEquals(metrics.size(), 16); }
public Map<MetricName, ? extends Metric> metrics() { return Collections.unmodifiableMap(metrics.metrics()); }
KafkaStreams { public Map<MetricName, ? extends Metric> metrics() { return Collections.unmodifiableMap(metrics.metrics()); } }
KafkaStreams { public Map<MetricName, ? extends Metric> metrics() { return Collections.unmodifiableMap(metrics.metrics()); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); }
KafkaStreams { public Map<MetricName, ? extends Metric> metrics() { return Collections.unmodifiableMap(metrics.metrics()); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
KafkaStreams { public Map<MetricName, ? extends Metric> metrics() { return Collections.unmodifiableMap(metrics.metrics()); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
@Test(expected = IllegalStateException.class) public void shouldNotGetAllTasksWhenNotRunning() throws Exception { streams.allMetadata(); }
public Collection<StreamsMetadata> allMetadata() { validateIsRunning(); return streamsMetadataState.getAllMetadata(); }
KafkaStreams { public Collection<StreamsMetadata> allMetadata() { validateIsRunning(); return streamsMetadataState.getAllMetadata(); } }
KafkaStreams { public Collection<StreamsMetadata> allMetadata() { validateIsRunning(); return streamsMetadataState.getAllMetadata(); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); }
KafkaStreams { public Collection<StreamsMetadata> allMetadata() { validateIsRunning(); return streamsMetadataState.getAllMetadata(); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
KafkaStreams { public Collection<StreamsMetadata> allMetadata() { validateIsRunning(); return streamsMetadataState.getAllMetadata(); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
@Test(expected = IllegalStateException.class) public void shouldNotGetAllTasksWithStoreWhenNotRunning() throws Exception { streams.allMetadataForStore("store"); }
public Collection<StreamsMetadata> allMetadataForStore(final String storeName) { validateIsRunning(); return streamsMetadataState.getAllMetadataForStore(storeName); }
KafkaStreams { public Collection<StreamsMetadata> allMetadataForStore(final String storeName) { validateIsRunning(); return streamsMetadataState.getAllMetadataForStore(storeName); } }
KafkaStreams { public Collection<StreamsMetadata> allMetadataForStore(final String storeName) { validateIsRunning(); return streamsMetadataState.getAllMetadataForStore(storeName); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); }
KafkaStreams { public Collection<StreamsMetadata> allMetadataForStore(final String storeName) { validateIsRunning(); return streamsMetadataState.getAllMetadataForStore(storeName); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
KafkaStreams { public Collection<StreamsMetadata> allMetadataForStore(final String storeName) { validateIsRunning(); return streamsMetadataState.getAllMetadataForStore(storeName); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
@Test(expected = IllegalStateException.class) public void shouldNotGetTaskWithKeyAndSerializerWhenNotRunning() throws Exception { streams.metadataForKey("store", "key", Serdes.String().serializer()); }
public <K> StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer) { validateIsRunning(); return streamsMetadataState.getMetadataWithKey(storeName, key, keySerializer); }
KafkaStreams { public <K> StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer) { validateIsRunning(); return streamsMetadataState.getMetadataWithKey(storeName, key, keySerializer); } }
KafkaStreams { public <K> StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer) { validateIsRunning(); return streamsMetadataState.getMetadataWithKey(storeName, key, keySerializer); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); }
KafkaStreams { public <K> StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer) { validateIsRunning(); return streamsMetadataState.getMetadataWithKey(storeName, key, keySerializer); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
KafkaStreams { public <K> StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer) { validateIsRunning(); return streamsMetadataState.getMetadataWithKey(storeName, key, keySerializer); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
@Test(expected = IllegalStateException.class) public void shouldNotGetTaskWithKeyAndPartitionerWhenNotRunning() throws Exception { streams.metadataForKey("store", "key", new StreamPartitioner<String, Object>() { @Override public Integer partition(final String key, final Object value, final int numPartitions) { return 0; } }); }
public <K> StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer) { validateIsRunning(); return streamsMetadataState.getMetadataWithKey(storeName, key, keySerializer); }
KafkaStreams { public <K> StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer) { validateIsRunning(); return streamsMetadataState.getMetadataWithKey(storeName, key, keySerializer); } }
KafkaStreams { public <K> StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer) { validateIsRunning(); return streamsMetadataState.getMetadataWithKey(storeName, key, keySerializer); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); }
KafkaStreams { public <K> StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer) { validateIsRunning(); return streamsMetadataState.getMetadataWithKey(storeName, key, keySerializer); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
KafkaStreams { public <K> StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer) { validateIsRunning(); return streamsMetadataState.getMetadataWithKey(storeName, key, keySerializer); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
@Test public void testCleanup() throws Exception { final Properties props = new Properties(); props.setProperty(StreamsConfig.APPLICATION_ID_CONFIG, "testLocalCleanup"); props.setProperty(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, CLUSTER.bootstrapServers()); final KStreamBuilder builder = new KStreamBuilder(); final KafkaStreams streams = new KafkaStreams(builder, props); streams.cleanUp(); streams.start(); streams.close(); streams.cleanUp(); }
public void cleanUp() { if (state.isRunning()) { throw new IllegalStateException("Cannot clean up while running."); } final String appId = config.getString(StreamsConfig.APPLICATION_ID_CONFIG); final String stateDir = config.getString(StreamsConfig.STATE_DIR_CONFIG); final String localApplicationDir = stateDir + File.separator + appId; log.debug("{} Removing local Kafka Streams application data in {} for application {}.", logPrefix, localApplicationDir, appId); final StateDirectory stateDirectory = new StateDirectory(appId, "cleanup", stateDir, Time.SYSTEM); stateDirectory.cleanRemovedTasks(0); }
KafkaStreams { public void cleanUp() { if (state.isRunning()) { throw new IllegalStateException("Cannot clean up while running."); } final String appId = config.getString(StreamsConfig.APPLICATION_ID_CONFIG); final String stateDir = config.getString(StreamsConfig.STATE_DIR_CONFIG); final String localApplicationDir = stateDir + File.separator + appId; log.debug("{} Removing local Kafka Streams application data in {} for application {}.", logPrefix, localApplicationDir, appId); final StateDirectory stateDirectory = new StateDirectory(appId, "cleanup", stateDir, Time.SYSTEM); stateDirectory.cleanRemovedTasks(0); } }
KafkaStreams { public void cleanUp() { if (state.isRunning()) { throw new IllegalStateException("Cannot clean up while running."); } final String appId = config.getString(StreamsConfig.APPLICATION_ID_CONFIG); final String stateDir = config.getString(StreamsConfig.STATE_DIR_CONFIG); final String localApplicationDir = stateDir + File.separator + appId; log.debug("{} Removing local Kafka Streams application data in {} for application {}.", logPrefix, localApplicationDir, appId); final StateDirectory stateDirectory = new StateDirectory(appId, "cleanup", stateDir, Time.SYSTEM); stateDirectory.cleanRemovedTasks(0); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); }
KafkaStreams { public void cleanUp() { if (state.isRunning()) { throw new IllegalStateException("Cannot clean up while running."); } final String appId = config.getString(StreamsConfig.APPLICATION_ID_CONFIG); final String stateDir = config.getString(StreamsConfig.STATE_DIR_CONFIG); final String localApplicationDir = stateDir + File.separator + appId; log.debug("{} Removing local Kafka Streams application data in {} for application {}.", logPrefix, localApplicationDir, appId); final StateDirectory stateDirectory = new StateDirectory(appId, "cleanup", stateDir, Time.SYSTEM); stateDirectory.cleanRemovedTasks(0); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
KafkaStreams { public void cleanUp() { if (state.isRunning()) { throw new IllegalStateException("Cannot clean up while running."); } final String appId = config.getString(StreamsConfig.APPLICATION_ID_CONFIG); final String stateDir = config.getString(StreamsConfig.STATE_DIR_CONFIG); final String localApplicationDir = stateDir + File.separator + appId; log.debug("{} Removing local Kafka Streams application data in {} for application {}.", logPrefix, localApplicationDir, appId); final StateDirectory stateDirectory = new StateDirectory(appId, "cleanup", stateDir, Time.SYSTEM); stateDirectory.cleanRemovedTasks(0); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
@Test public void testToString() { streams.start(); String streamString = streams.toString(); streams.close(); String appId = streamString.split("\\n")[1].split(":")[1].trim(); Assert.assertNotEquals("streamString should not be empty", "", streamString); Assert.assertNotNull("streamString should not be null", streamString); Assert.assertNotEquals("streamString contains non-empty appId", "", appId); Assert.assertNotNull("streamString contains non-null appId", appId); }
@Override public String toString() { return toString(""); }
KafkaStreams { @Override public String toString() { return toString(""); } }
KafkaStreams { @Override public String toString() { return toString(""); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); }
KafkaStreams { @Override public String toString() { return toString(""); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
KafkaStreams { @Override public String toString() { return toString(""); } KafkaStreams(final TopologyBuilder builder, final Properties props); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config); KafkaStreams(final TopologyBuilder builder, final StreamsConfig config, final KafkaClientSupplier clientSupplier); void setStateListener(final KafkaStreams.StateListener listener); synchronized State state(); Map<MetricName, ? extends Metric> metrics(); synchronized void start(); void close(); synchronized boolean close(final long timeout, final TimeUnit timeUnit); @Override String toString(); String toString(final String indent); void cleanUp(); void setUncaughtExceptionHandler(final Thread.UncaughtExceptionHandler eh); Collection<StreamsMetadata> allMetadata(); Collection<StreamsMetadata> allMetadataForStore(final String storeName); StreamsMetadata metadataForKey(final String storeName, final K key, final Serializer<K> keySerializer); StreamsMetadata metadataForKey(final String storeName, final K key, final StreamPartitioner<? super K, ?> partitioner); T store(final String storeName, final QueryableStoreType<T> queryableStoreType); }
@Test public void shouldSetNumberOfSegments() { final int anySegmentSizeLargerThanOne = 5; assertEquals(anySegmentSizeLargerThanOne, new TestWindows().segments(anySegmentSizeLargerThanOne).segments); }
protected Windows<W> segments(final int segments) throws IllegalArgumentException { if (segments < 2) { throw new IllegalArgumentException("Number of segments must be at least 2."); } this.segments = segments; return this; }
Windows { protected Windows<W> segments(final int segments) throws IllegalArgumentException { if (segments < 2) { throw new IllegalArgumentException("Number of segments must be at least 2."); } this.segments = segments; return this; } }
Windows { protected Windows<W> segments(final int segments) throws IllegalArgumentException { if (segments < 2) { throw new IllegalArgumentException("Number of segments must be at least 2."); } this.segments = segments; return this; } protected Windows(); }
Windows { protected Windows<W> segments(final int segments) throws IllegalArgumentException { if (segments < 2) { throw new IllegalArgumentException("Number of segments must be at least 2."); } this.segments = segments; return this; } protected Windows(); Windows<W> until(final long durationMs); long maintainMs(); abstract Map<Long, W> windowsFor(final long timestamp); abstract long size(); }
Windows { protected Windows<W> segments(final int segments) throws IllegalArgumentException { if (segments < 2) { throw new IllegalArgumentException("Number of segments must be at least 2."); } this.segments = segments; return this; } protected Windows(); Windows<W> until(final long durationMs); long maintainMs(); abstract Map<Long, W> windowsFor(final long timestamp); abstract long size(); public int segments; }
@Test(expected = IllegalArgumentException.class) public void numberOfSegmentsMustBeAtLeastTwo() { new TestWindows().segments(1); }
protected Windows<W> segments(final int segments) throws IllegalArgumentException { if (segments < 2) { throw new IllegalArgumentException("Number of segments must be at least 2."); } this.segments = segments; return this; }
Windows { protected Windows<W> segments(final int segments) throws IllegalArgumentException { if (segments < 2) { throw new IllegalArgumentException("Number of segments must be at least 2."); } this.segments = segments; return this; } }
Windows { protected Windows<W> segments(final int segments) throws IllegalArgumentException { if (segments < 2) { throw new IllegalArgumentException("Number of segments must be at least 2."); } this.segments = segments; return this; } protected Windows(); }
Windows { protected Windows<W> segments(final int segments) throws IllegalArgumentException { if (segments < 2) { throw new IllegalArgumentException("Number of segments must be at least 2."); } this.segments = segments; return this; } protected Windows(); Windows<W> until(final long durationMs); long maintainMs(); abstract Map<Long, W> windowsFor(final long timestamp); abstract long size(); }
Windows { protected Windows<W> segments(final int segments) throws IllegalArgumentException { if (segments < 2) { throw new IllegalArgumentException("Number of segments must be at least 2."); } this.segments = segments; return this; } protected Windows(); Windows<W> until(final long durationMs); long maintainMs(); abstract Map<Long, W> windowsFor(final long timestamp); abstract long size(); public int segments; }
@Test(expected = IllegalArgumentException.class) public void retentionTimeMustNotBeNegative() { new TestWindows().until(-1); }
public Windows<W> until(final long durationMs) throws IllegalArgumentException { if (durationMs < 0) { throw new IllegalArgumentException("Window retention time (durationMs) cannot be negative."); } maintainDurationMs = durationMs; return this; }
Windows { public Windows<W> until(final long durationMs) throws IllegalArgumentException { if (durationMs < 0) { throw new IllegalArgumentException("Window retention time (durationMs) cannot be negative."); } maintainDurationMs = durationMs; return this; } }
Windows { public Windows<W> until(final long durationMs) throws IllegalArgumentException { if (durationMs < 0) { throw new IllegalArgumentException("Window retention time (durationMs) cannot be negative."); } maintainDurationMs = durationMs; return this; } protected Windows(); }
Windows { public Windows<W> until(final long durationMs) throws IllegalArgumentException { if (durationMs < 0) { throw new IllegalArgumentException("Window retention time (durationMs) cannot be negative."); } maintainDurationMs = durationMs; return this; } protected Windows(); Windows<W> until(final long durationMs); long maintainMs(); abstract Map<Long, W> windowsFor(final long timestamp); abstract long size(); }
Windows { public Windows<W> until(final long durationMs) throws IllegalArgumentException { if (durationMs < 0) { throw new IllegalArgumentException("Window retention time (durationMs) cannot be negative."); } maintainDurationMs = durationMs; return this; } protected Windows(); Windows<W> until(final long durationMs); long maintainMs(); abstract Map<Long, W> windowsFor(final long timestamp); abstract long size(); public int segments; }
@Test(expected = ConfigException.class) public void testConfigMissingFormat() { TimestampConverter<SourceRecord> xform = new TimestampConverter.Value<>(); xform.configure(Collections.singletonMap(TimestampConverter.TARGET_TYPE_CONFIG, "string")); }
@Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } @Override void configure(Map<String, ?> configs); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } @Override void configure(Map<String, ?> configs); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); static final String OVERVIEW_DOC; static final String FIELD_CONFIG; static final String TARGET_TYPE_CONFIG; static final String FORMAT_CONFIG; static final ConfigDef CONFIG_DEF; }
@Test public void floatToConnect() { assertEquals(new SchemaAndValue(Schema.FLOAT32_SCHEMA, 12.34f), converter.toConnectData(TOPIC, "{ \"schema\": { \"type\": \"float\" }, \"payload\": 12.34 }".getBytes())); }
@Override public SchemaAndValue toConnectData(String topic, byte[] value) { JsonNode jsonValue; try { jsonValue = deserializer.deserialize(topic, value); } catch (SerializationException e) { throw new DataException("Converting byte[] to Kafka Connect data failed due to serialization error: ", e); } if (enableSchemas && (jsonValue == null || !jsonValue.isObject() || jsonValue.size() != 2 || !jsonValue.has("schema") || !jsonValue.has("payload"))) throw new DataException("JsonConverter with schemas.enable requires \"schema\" and \"payload\" fields and may not contain additional fields." + " If you are trying to deserialize plain JSON data, set schemas.enable=false in your converter configuration."); if (!enableSchemas) { ObjectNode envelope = JsonNodeFactory.instance.objectNode(); envelope.set("schema", null); envelope.set("payload", jsonValue); jsonValue = envelope; } return jsonToConnect(jsonValue); }
JsonConverter implements Converter { @Override public SchemaAndValue toConnectData(String topic, byte[] value) { JsonNode jsonValue; try { jsonValue = deserializer.deserialize(topic, value); } catch (SerializationException e) { throw new DataException("Converting byte[] to Kafka Connect data failed due to serialization error: ", e); } if (enableSchemas && (jsonValue == null || !jsonValue.isObject() || jsonValue.size() != 2 || !jsonValue.has("schema") || !jsonValue.has("payload"))) throw new DataException("JsonConverter with schemas.enable requires \"schema\" and \"payload\" fields and may not contain additional fields." + " If you are trying to deserialize plain JSON data, set schemas.enable=false in your converter configuration."); if (!enableSchemas) { ObjectNode envelope = JsonNodeFactory.instance.objectNode(); envelope.set("schema", null); envelope.set("payload", jsonValue); jsonValue = envelope; } return jsonToConnect(jsonValue); } }
JsonConverter implements Converter { @Override public SchemaAndValue toConnectData(String topic, byte[] value) { JsonNode jsonValue; try { jsonValue = deserializer.deserialize(topic, value); } catch (SerializationException e) { throw new DataException("Converting byte[] to Kafka Connect data failed due to serialization error: ", e); } if (enableSchemas && (jsonValue == null || !jsonValue.isObject() || jsonValue.size() != 2 || !jsonValue.has("schema") || !jsonValue.has("payload"))) throw new DataException("JsonConverter with schemas.enable requires \"schema\" and \"payload\" fields and may not contain additional fields." + " If you are trying to deserialize plain JSON data, set schemas.enable=false in your converter configuration."); if (!enableSchemas) { ObjectNode envelope = JsonNodeFactory.instance.objectNode(); envelope.set("schema", null); envelope.set("payload", jsonValue); jsonValue = envelope; } return jsonToConnect(jsonValue); } }
JsonConverter implements Converter { @Override public SchemaAndValue toConnectData(String topic, byte[] value) { JsonNode jsonValue; try { jsonValue = deserializer.deserialize(topic, value); } catch (SerializationException e) { throw new DataException("Converting byte[] to Kafka Connect data failed due to serialization error: ", e); } if (enableSchemas && (jsonValue == null || !jsonValue.isObject() || jsonValue.size() != 2 || !jsonValue.has("schema") || !jsonValue.has("payload"))) throw new DataException("JsonConverter with schemas.enable requires \"schema\" and \"payload\" fields and may not contain additional fields." + " If you are trying to deserialize plain JSON data, set schemas.enable=false in your converter configuration."); if (!enableSchemas) { ObjectNode envelope = JsonNodeFactory.instance.objectNode(); envelope.set("schema", null); envelope.set("payload", jsonValue); jsonValue = envelope; } return jsonToConnect(jsonValue); } @Override void configure(Map<String, ?> configs, boolean isKey); @Override byte[] fromConnectData(String topic, Schema schema, Object value); @Override SchemaAndValue toConnectData(String topic, byte[] value); ObjectNode asJsonSchema(Schema schema); Schema asConnectSchema(JsonNode jsonSchema); }
JsonConverter implements Converter { @Override public SchemaAndValue toConnectData(String topic, byte[] value) { JsonNode jsonValue; try { jsonValue = deserializer.deserialize(topic, value); } catch (SerializationException e) { throw new DataException("Converting byte[] to Kafka Connect data failed due to serialization error: ", e); } if (enableSchemas && (jsonValue == null || !jsonValue.isObject() || jsonValue.size() != 2 || !jsonValue.has("schema") || !jsonValue.has("payload"))) throw new DataException("JsonConverter with schemas.enable requires \"schema\" and \"payload\" fields and may not contain additional fields." + " If you are trying to deserialize plain JSON data, set schemas.enable=false in your converter configuration."); if (!enableSchemas) { ObjectNode envelope = JsonNodeFactory.instance.objectNode(); envelope.set("schema", null); envelope.set("payload", jsonValue); jsonValue = envelope; } return jsonToConnect(jsonValue); } @Override void configure(Map<String, ?> configs, boolean isKey); @Override byte[] fromConnectData(String topic, Schema schema, Object value); @Override SchemaAndValue toConnectData(String topic, byte[] value); ObjectNode asJsonSchema(Schema schema); Schema asConnectSchema(JsonNode jsonSchema); }
@Test(expected = TopologyBuilderException.class) public void testFrom() { builder.stream("topic-1", "topic-2"); builder.addSource(KStreamImpl.SOURCE_NAME + "0000000000", "topic-3"); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void testNewName() { assertEquals("X-0000000000", builder.newName("X-")); assertEquals("Y-0000000001", builder.newName("Y-")); assertEquals("Z-0000000002", builder.newName("Z-")); final KStreamBuilder newBuilder = new KStreamBuilder(); assertEquals("X-0000000000", newBuilder.newName("X-")); assertEquals("Y-0000000001", newBuilder.newName("Y-")); assertEquals("Z-0000000002", newBuilder.newName("Z-")); }
public String newName(final String prefix) { return prefix + String.format("%010d", index.getAndIncrement()); }
KStreamBuilder extends TopologyBuilder { public String newName(final String prefix) { return prefix + String.format("%010d", index.getAndIncrement()); } }
KStreamBuilder extends TopologyBuilder { public String newName(final String prefix) { return prefix + String.format("%010d", index.getAndIncrement()); } }
KStreamBuilder extends TopologyBuilder { public String newName(final String prefix) { return prefix + String.format("%010d", index.getAndIncrement()); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public String newName(final String prefix) { return prefix + String.format("%010d", index.getAndIncrement()); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldNotTryProcessingFromSinkTopic() { final KStream<String, String> source = builder.stream("topic-source"); source.to("topic-sink"); final MockProcessorSupplier<String, String> processorSupplier = new MockProcessorSupplier<>(); source.process(processorSupplier); driver = new KStreamTestDriver(builder); driver.setTime(0L); driver.process("topic-source", "A", "aa"); assertEquals(Utils.mkList("A:aa"), processorSupplier.processed); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldTryProcessingFromThoughTopic() { final KStream<String, String> source = builder.stream("topic-source"); final KStream<String, String> through = source.through("topic-sink"); final MockProcessorSupplier<String, String> sourceProcessorSupplier = new MockProcessorSupplier<>(); final MockProcessorSupplier<String, String> throughProcessorSupplier = new MockProcessorSupplier<>(); source.process(sourceProcessorSupplier); through.process(throughProcessorSupplier); driver = new KStreamTestDriver(builder); driver.setTime(0L); driver.process("topic-source", "A", "aa"); assertEquals(Utils.mkList("A:aa"), sourceProcessorSupplier.processed); assertEquals(Utils.mkList("A:aa"), throughProcessorSupplier.processed); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void testNewStoreName() { assertEquals("X-STATE-STORE-0000000000", builder.newStoreName("X-")); assertEquals("Y-STATE-STORE-0000000001", builder.newStoreName("Y-")); assertEquals("Z-STATE-STORE-0000000002", builder.newStoreName("Z-")); KStreamBuilder newBuilder = new KStreamBuilder(); assertEquals("X-STATE-STORE-0000000000", newBuilder.newStoreName("X-")); assertEquals("Y-STATE-STORE-0000000001", newBuilder.newStoreName("Y-")); assertEquals("Z-STATE-STORE-0000000002", newBuilder.newStoreName("Z-")); }
public String newStoreName(final String prefix) { return prefix + String.format(KTableImpl.STATE_STORE_NAME + "%010d", index.getAndIncrement()); }
KStreamBuilder extends TopologyBuilder { public String newStoreName(final String prefix) { return prefix + String.format(KTableImpl.STATE_STORE_NAME + "%010d", index.getAndIncrement()); } }
KStreamBuilder extends TopologyBuilder { public String newStoreName(final String prefix) { return prefix + String.format(KTableImpl.STATE_STORE_NAME + "%010d", index.getAndIncrement()); } }
KStreamBuilder extends TopologyBuilder { public String newStoreName(final String prefix) { return prefix + String.format(KTableImpl.STATE_STORE_NAME + "%010d", index.getAndIncrement()); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public String newStoreName(final String prefix) { return prefix + String.format(KTableImpl.STATE_STORE_NAME + "%010d", index.getAndIncrement()); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void testMerge() { final String topic1 = "topic-1"; final String topic2 = "topic-2"; final KStream<String, String> source1 = builder.stream(topic1); final KStream<String, String> source2 = builder.stream(topic2); final KStream<String, String> merged = builder.merge(source1, source2); final MockProcessorSupplier<String, String> processorSupplier = new MockProcessorSupplier<>(); merged.process(processorSupplier); driver = new KStreamTestDriver(builder); driver.setTime(0L); driver.process(topic1, "A", "aa"); driver.process(topic2, "B", "bb"); driver.process(topic2, "C", "cc"); driver.process(topic1, "D", "dd"); assertEquals(Utils.mkList("A:aa", "B:bb", "C:cc", "D:dd"), processorSupplier.processed); }
public <K, V> KStream<K, V> merge(final KStream<K, V>... streams) { return KStreamImpl.merge(this, streams); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> merge(final KStream<K, V>... streams) { return KStreamImpl.merge(this, streams); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> merge(final KStream<K, V>... streams) { return KStreamImpl.merge(this, streams); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> merge(final KStream<K, V>... streams) { return KStreamImpl.merge(this, streams); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> merge(final KStream<K, V>... streams) { return KStreamImpl.merge(this, streams); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test(expected = TopologyBuilderException.class) public void shouldThrowExceptionWhenNoTopicPresent() throws Exception { builder.stream(); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test(expected = NullPointerException.class) public void shouldThrowExceptionWhenTopicNamesAreNull() throws Exception { builder.stream(Serdes.String(), Serdes.String(), null, null); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldStillMaterializeSourceKTableIfStateNameNotSpecified() throws Exception { KTable table1 = builder.table("topic1", "table1"); KTable table2 = builder.table("topic2", (String) null); final ProcessorTopology topology = builder.build(null); assertEquals(2, topology.stateStores().size()); assertEquals("table1", topology.stateStores().get(0).name()); final String internalStoreName = topology.stateStores().get(1).name(); assertTrue(internalStoreName.contains(KTableImpl.STATE_STORE_NAME)); assertEquals(2, topology.storeToChangelogTopic().size()); assertEquals("topic1", topology.storeToChangelogTopic().get("table1")); assertEquals("topic2", topology.storeToChangelogTopic().get(internalStoreName)); assertEquals(table1.queryableStoreName(), "table1"); assertNull(table2.queryableStoreName()); }
public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldBuildSimpleGlobalTableTopology() throws Exception { builder.globalTable("table", "globalTable"); final ProcessorTopology topology = builder.buildGlobalStateTopology(); final List<StateStore> stateStores = topology.globalStateStores(); assertEquals(1, stateStores.size()); assertEquals("globalTable", stateStores.get(0).name()); }
public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test(expected = ConfigException.class) public void testConfigInvalidFormat() { TimestampConverter<SourceRecord> xform = new TimestampConverter.Value<>(); Map<String, String> config = new HashMap<>(); config.put(TimestampConverter.TARGET_TYPE_CONFIG, "string"); config.put(TimestampConverter.FORMAT_CONFIG, "bad-format"); xform.configure(config); }
@Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } @Override void configure(Map<String, ?> configs); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); }
TimestampConverter implements Transformation<R> { @Override public void configure(Map<String, ?> configs) { final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs); final String field = simpleConfig.getString(FIELD_CONFIG); final String type = simpleConfig.getString(TARGET_TYPE_CONFIG); String formatPattern = simpleConfig.getString(FORMAT_CONFIG); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); if (!VALID_TYPES.contains(type)) { throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are " + Utils.join(VALID_TYPES, ", ") + "."); } if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) { throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps"); } SimpleDateFormat format = null; if (formatPattern != null && !formatPattern.trim().isEmpty()) { try { format = new SimpleDateFormat(formatPattern); format.setTimeZone(UTC); } catch (IllegalArgumentException e) { throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: " + formatPattern, e); } } config = new Config(field, type, format); } @Override void configure(Map<String, ?> configs); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); static final String OVERVIEW_DOC; static final String FIELD_CONFIG; static final String TARGET_TYPE_CONFIG; static final String FORMAT_CONFIG; static final ConfigDef CONFIG_DEF; }
@Test public void shouldBuildGlobalTopologyWithAllGlobalTables() throws Exception { builder.globalTable("table", "globalTable"); builder.globalTable("table2", "globalTable2"); doBuildGlobalTopologyWithAllGlobalTables(); }
public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldBuildGlobalTopologyWithAllGlobalTablesWithInternalStoreName() throws Exception { builder.globalTable("table"); builder.globalTable("table2"); doBuildGlobalTopologyWithAllGlobalTables(); }
public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName) { return globalTable(null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldAddTopicToEarliestAutoOffsetResetList() { final String topicName = "topic-1"; builder.stream(TopologyBuilder.AutoOffsetReset.EARLIEST, topicName); assertTrue(builder.earliestResetTopicsPattern().matcher(topicName).matches()); assertFalse(builder.latestResetTopicsPattern().matcher(topicName).matches()); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldAddTopicToLatestAutoOffsetResetList() { final String topicName = "topic-1"; builder.stream(TopologyBuilder.AutoOffsetReset.LATEST, topicName); assertTrue(builder.latestResetTopicsPattern().matcher(topicName).matches()); assertFalse(builder.earliestResetTopicsPattern().matcher(topicName).matches()); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldAddTableToEarliestAutoOffsetResetList() { final String topicName = "topic-1"; final String storeName = "test-store"; builder.table(TopologyBuilder.AutoOffsetReset.EARLIEST, topicName, storeName); assertTrue(builder.earliestResetTopicsPattern().matcher(topicName).matches()); assertFalse(builder.latestResetTopicsPattern().matcher(topicName).matches()); }
public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldAddTableToLatestAutoOffsetResetList() { final String topicName = "topic-1"; final String storeName = "test-store"; builder.table(TopologyBuilder.AutoOffsetReset.LATEST, topicName, storeName); assertTrue(builder.latestResetTopicsPattern().matcher(topicName).matches()); assertFalse(builder.earliestResetTopicsPattern().matcher(topicName).matches()); }
public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldNotAddTableToOffsetResetLists() { final String topicName = "topic-1"; final String storeName = "test-store"; final Serde<String> stringSerde = Serdes.String(); builder.table(stringSerde, stringSerde, topicName, storeName); assertFalse(builder.latestResetTopicsPattern().matcher(topicName).matches()); assertFalse(builder.earliestResetTopicsPattern().matcher(topicName).matches()); }
public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldNotAddRegexTopicsToOffsetResetLists() { final Pattern topicPattern = Pattern.compile("topic-\\d"); final String topic = "topic-5"; builder.stream(topicPattern); assertFalse(builder.latestResetTopicsPattern().matcher(topic).matches()); assertFalse(builder.earliestResetTopicsPattern().matcher(topic).matches()); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldAddRegexTopicToEarliestAutoOffsetResetList() { final Pattern topicPattern = Pattern.compile("topic-\\d+"); final String topicTwo = "topic-500000"; builder.stream(TopologyBuilder.AutoOffsetReset.EARLIEST, topicPattern); assertTrue(builder.earliestResetTopicsPattern().matcher(topicTwo).matches()); assertFalse(builder.latestResetTopicsPattern().matcher(topicTwo).matches()); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldAddRegexTopicToLatestAutoOffsetResetList() { final Pattern topicPattern = Pattern.compile("topic-\\d+"); final String topicTwo = "topic-1000000"; builder.stream(TopologyBuilder.AutoOffsetReset.LATEST, topicPattern); assertTrue(builder.latestResetTopicsPattern().matcher(topicTwo).matches()); assertFalse(builder.earliestResetTopicsPattern().matcher(topicTwo).matches()); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void schemaless() { final Map<String, Object> value = new HashMap<>(); value.put("magic", 42); value.put("bool", true); value.put("byte", (byte) 42); value.put("short", (short) 42); value.put("int", 42); value.put("long", 42L); value.put("float", 42f); value.put("double", 42d); value.put("string", "blabla"); value.put("date", new Date()); value.put("bigint", new BigInteger("42")); value.put("bigdec", new BigDecimal("42.0")); value.put("list", Collections.singletonList(42)); value.put("map", Collections.singletonMap("key", "value")); final List<String> maskFields = new ArrayList<>(value.keySet()); maskFields.remove("magic"); final Map<String, Object> updatedValue = (Map) transform(maskFields).apply(record(null, value)).value(); assertEquals(42, updatedValue.get("magic")); assertEquals(false, updatedValue.get("bool")); assertEquals((byte) 0, updatedValue.get("byte")); assertEquals((short) 0, updatedValue.get("short")); assertEquals(0, updatedValue.get("int")); assertEquals(0L, updatedValue.get("long")); assertEquals(0f, updatedValue.get("float")); assertEquals(0d, updatedValue.get("double")); assertEquals("", updatedValue.get("string")); assertEquals(new Date(0), updatedValue.get("date")); assertEquals(BigInteger.ZERO, updatedValue.get("bigint")); assertEquals(BigDecimal.ZERO, updatedValue.get("bigdec")); assertEquals(Collections.emptyList(), updatedValue.get("list")); assertEquals(Collections.emptyMap(), updatedValue.get("map")); }
@Override public R apply(R record) { if (operatingSchema(record) == null) { return applySchemaless(record); } else { return applyWithSchema(record); } }
MaskField implements Transformation<R> { @Override public R apply(R record) { if (operatingSchema(record) == null) { return applySchemaless(record); } else { return applyWithSchema(record); } } }
MaskField implements Transformation<R> { @Override public R apply(R record) { if (operatingSchema(record) == null) { return applySchemaless(record); } else { return applyWithSchema(record); } } }
MaskField implements Transformation<R> { @Override public R apply(R record) { if (operatingSchema(record) == null) { return applySchemaless(record); } else { return applyWithSchema(record); } } @Override void configure(Map<String, ?> props); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); }
MaskField implements Transformation<R> { @Override public R apply(R record) { if (operatingSchema(record) == null) { return applySchemaless(record); } else { return applyWithSchema(record); } } @Override void configure(Map<String, ?> props); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); static final String OVERVIEW_DOC; static final ConfigDef CONFIG_DEF; }
@SuppressWarnings("unchecked") @Test public void kStreamTimestampExtractorShouldBeNull() throws Exception { builder.stream("topic"); final ProcessorTopology processorTopology = builder.build(null); assertNull(processorTopology.source("topic").getTimestampExtractor()); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@SuppressWarnings("unchecked") @Test public void shouldAddTimestampExtractorToStreamWithKeyValSerdePerSource() throws Exception { builder.stream(new MockTimestampExtractor(), null, null, "topic"); final ProcessorTopology processorTopology = builder.build(null); for (final SourceNode sourceNode: processorTopology.sources()) { assertThat(sourceNode.getTimestampExtractor(), instanceOf(MockTimestampExtractor.class)); } }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@SuppressWarnings("unchecked") @Test public void shouldAddTimestampExtractorToStreamWithOffsetResetPerSource() throws Exception { builder.stream(null, new MockTimestampExtractor(), null, null, "topic"); final ProcessorTopology processorTopology = builder.build(null); assertThat(processorTopology.source("topic").getTimestampExtractor(), instanceOf(MockTimestampExtractor.class)); }
public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KStream<K, V> stream(final String... topics) { return stream(null, null, null, null, topics); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@SuppressWarnings("unchecked") @Test public void shouldAddTimestampExtractorToTablePerSource() throws Exception { builder.table("topic", "store"); final ProcessorTopology processorTopology = builder.build(null); assertNull(processorTopology.source("topic").getTimestampExtractor()); }
public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@SuppressWarnings("unchecked") @Test public void kTableTimestampExtractorShouldBeNull() throws Exception { builder.table("topic", "store"); final ProcessorTopology processorTopology = builder.build(null); assertNull(processorTopology.source("topic").getTimestampExtractor()); }
public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@SuppressWarnings("unchecked") @Test public void shouldAddTimestampExtractorToTableWithKeyValSerdePerSource() throws Exception { builder.table(null, new MockTimestampExtractor(), null, null, "topic", "store"); final ProcessorTopology processorTopology = builder.build(null); assertThat(processorTopology.source("topic").getTimestampExtractor(), instanceOf(MockTimestampExtractor.class)); }
public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
KStreamBuilder extends TopologyBuilder { public <K, V> KTable<K, V> table(final String topic, final String queryableStoreName) { return table(null, null, null, null, topic, queryableStoreName); } KStream<K, V> stream(final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final String... topics); KStream<K, V> stream(final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Pattern topicPattern); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String... topics); KStream<K, V> stream(final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KStream<K, V> stream(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final Pattern topicPattern); KTable<K, V> table(final String topic, final String queryableStoreName); KTable<K, V> table(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final AutoOffsetReset offsetReset, final String topic); KTable<K, V> table(final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final String topic, final String storeName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); KTable<K, V> table(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String storeName); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); KTable<K, V> table(final AutoOffsetReset offsetReset, final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KTable<K, V> table(final AutoOffsetReset offsetReset, final TimestampExtractor timestampExtractor, final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); GlobalKTable<K, V> globalTable(final String topic, final String queryableStoreName); GlobalKTable<K, V> globalTable(final String topic); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final TimestampExtractor timestampExtractor, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @SuppressWarnings("unchecked") GlobalKTable<K, V> globalTable(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); KStream<K, V> merge(final KStream<K, V>... streams); String newName(final String prefix); String newStoreName(final String prefix); }
@Test public void shouldSetWindowSize() { assertEquals(ANY_SIZE, TimeWindows.of(ANY_SIZE).sizeMs); }
public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } private TimeWindows(final long sizeMs, final long advanceMs); }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } private TimeWindows(final long sizeMs, final long advanceMs); static TimeWindows of(final long sizeMs); TimeWindows advanceBy(final long advanceMs); @Override Map<Long, TimeWindow> windowsFor(final long timestamp); @Override long size(); @Override TimeWindows until(final long durationMs); @Override long maintainMs(); @Override boolean equals(final Object o); @Override int hashCode(); }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } private TimeWindows(final long sizeMs, final long advanceMs); static TimeWindows of(final long sizeMs); TimeWindows advanceBy(final long advanceMs); @Override Map<Long, TimeWindow> windowsFor(final long timestamp); @Override long size(); @Override TimeWindows until(final long durationMs); @Override long maintainMs(); @Override boolean equals(final Object o); @Override int hashCode(); final long sizeMs; final long advanceMs; }
@Test(expected = IllegalArgumentException.class) public void windowSizeMustNotBeZero() { TimeWindows.of(0); }
public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } private TimeWindows(final long sizeMs, final long advanceMs); }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } private TimeWindows(final long sizeMs, final long advanceMs); static TimeWindows of(final long sizeMs); TimeWindows advanceBy(final long advanceMs); @Override Map<Long, TimeWindow> windowsFor(final long timestamp); @Override long size(); @Override TimeWindows until(final long durationMs); @Override long maintainMs(); @Override boolean equals(final Object o); @Override int hashCode(); }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } private TimeWindows(final long sizeMs, final long advanceMs); static TimeWindows of(final long sizeMs); TimeWindows advanceBy(final long advanceMs); @Override Map<Long, TimeWindow> windowsFor(final long timestamp); @Override long size(); @Override TimeWindows until(final long durationMs); @Override long maintainMs(); @Override boolean equals(final Object o); @Override int hashCode(); final long sizeMs; final long advanceMs; }
@Test(expected = IllegalArgumentException.class) public void windowSizeMustNotBeNegative() { TimeWindows.of(-1); }
public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } private TimeWindows(final long sizeMs, final long advanceMs); }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } private TimeWindows(final long sizeMs, final long advanceMs); static TimeWindows of(final long sizeMs); TimeWindows advanceBy(final long advanceMs); @Override Map<Long, TimeWindow> windowsFor(final long timestamp); @Override long size(); @Override TimeWindows until(final long durationMs); @Override long maintainMs(); @Override boolean equals(final Object o); @Override int hashCode(); }
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } private TimeWindows(final long sizeMs, final long advanceMs); static TimeWindows of(final long sizeMs); TimeWindows advanceBy(final long advanceMs); @Override Map<Long, TimeWindow> windowsFor(final long timestamp); @Override long size(); @Override TimeWindows until(final long durationMs); @Override long maintainMs(); @Override boolean equals(final Object o); @Override int hashCode(); final long sizeMs; final long advanceMs; }
@Test public void testRepartition() throws Exception { String topic1 = "topic1"; String storeName1 = "storeName1"; final KStreamBuilder builder = new KStreamBuilder(); KTableImpl<String, String, String> table1 = (KTableImpl<String, String, String>) builder.table(stringSerde, stringSerde, topic1, storeName1); KTableImpl<String, String, String> table1Aggregated = (KTableImpl<String, String, String>) table1 .groupBy(MockKeyValueMapper.<String, String>NoOpKeyValueMapper()) .aggregate(MockInitializer.STRING_INIT, MockAggregator.TOSTRING_ADDER, MockAggregator.TOSTRING_REMOVER, "mock-result1"); KTableImpl<String, String, String> table1Reduced = (KTableImpl<String, String, String>) table1 .groupBy(MockKeyValueMapper.<String, String>NoOpKeyValueMapper()) .reduce(MockReducer.STRING_ADDER, MockReducer.STRING_REMOVER, "mock-result2"); driver = new KStreamTestDriver(builder, stateDir, stringSerde, stringSerde); driver.setTime(0L); assertEquals(3, driver.allStateStores().size()); assertTrue(driver.allProcessorNames().contains("KSTREAM-SINK-0000000003")); assertTrue(driver.allProcessorNames().contains("KSTREAM-SOURCE-0000000004")); assertTrue(driver.allProcessorNames().contains("KSTREAM-SINK-0000000007")); assertTrue(driver.allProcessorNames().contains("KSTREAM-SOURCE-0000000008")); Field valSerializerField = ((SinkNode) driver.processor("KSTREAM-SINK-0000000003")).getClass().getDeclaredField("valSerializer"); Field valDeserializerField = ((SourceNode) driver.processor("KSTREAM-SOURCE-0000000004")).getClass().getDeclaredField("valDeserializer"); valSerializerField.setAccessible(true); valDeserializerField.setAccessible(true); assertNotNull(((ChangedSerializer) valSerializerField.get(driver.processor("KSTREAM-SINK-0000000003"))).inner()); assertNotNull(((ChangedDeserializer) valDeserializerField.get(driver.processor("KSTREAM-SOURCE-0000000004"))).inner()); assertNotNull(((ChangedSerializer) valSerializerField.get(driver.processor("KSTREAM-SINK-0000000007"))).inner()); assertNotNull(((ChangedDeserializer) valDeserializerField.get(driver.processor("KSTREAM-SOURCE-0000000008"))).inner()); }
@Override public <K1, V1> KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde) { Objects.requireNonNull(selector, "selector can't be null"); String selectName = topology.newName(SELECT_NAME); KTableProcessorSupplier<K, V, KeyValue<K1, V1>> selectSupplier = new KTableRepartitionMap<K, V, K1, V1>(this, selector); topology.addProcessor(selectName, selectSupplier, this.name); this.enableSendingOldValues(); return new KGroupedTableImpl<>(topology, selectName, this.name, keySerde, valueSerde); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <K1, V1> KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde) { Objects.requireNonNull(selector, "selector can't be null"); String selectName = topology.newName(SELECT_NAME); KTableProcessorSupplier<K, V, KeyValue<K1, V1>> selectSupplier = new KTableRepartitionMap<K, V, K1, V1>(this, selector); topology.addProcessor(selectName, selectSupplier, this.name); this.enableSendingOldValues(); return new KGroupedTableImpl<>(topology, selectName, this.name, keySerde, valueSerde); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <K1, V1> KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde) { Objects.requireNonNull(selector, "selector can't be null"); String selectName = topology.newName(SELECT_NAME); KTableProcessorSupplier<K, V, KeyValue<K1, V1>> selectSupplier = new KTableRepartitionMap<K, V, K1, V1>(this, selector); topology.addProcessor(selectName, selectSupplier, this.name); this.enableSendingOldValues(); return new KGroupedTableImpl<>(topology, selectName, this.name, keySerde, valueSerde); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <K1, V1> KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde) { Objects.requireNonNull(selector, "selector can't be null"); String selectName = topology.newName(SELECT_NAME); KTableProcessorSupplier<K, V, KeyValue<K1, V1>> selectSupplier = new KTableRepartitionMap<K, V, K1, V1>(this, selector); topology.addProcessor(selectName, selectSupplier, this.name); this.enableSendingOldValues(); return new KGroupedTableImpl<>(topology, selectName, this.name, keySerde, valueSerde); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <K1, V1> KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde) { Objects.requireNonNull(selector, "selector can't be null"); String selectName = topology.newName(SELECT_NAME); KTableProcessorSupplier<K, V, KeyValue<K1, V1>> selectSupplier = new KTableRepartitionMap<K, V, K1, V1>(this, selector); topology.addProcessor(selectName, selectSupplier, this.name); this.enableSendingOldValues(); return new KGroupedTableImpl<>(topology, selectName, this.name, keySerde, valueSerde); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test public void withSchema() { Schema schema = SchemaBuilder.struct() .field("magic", Schema.INT32_SCHEMA) .field("bool", Schema.BOOLEAN_SCHEMA) .field("byte", Schema.INT8_SCHEMA) .field("short", Schema.INT16_SCHEMA) .field("int", Schema.INT32_SCHEMA) .field("long", Schema.INT64_SCHEMA) .field("float", Schema.FLOAT32_SCHEMA) .field("double", Schema.FLOAT64_SCHEMA) .field("string", Schema.STRING_SCHEMA) .field("date", org.apache.kafka.connect.data.Date.SCHEMA) .field("time", Time.SCHEMA) .field("timestamp", Timestamp.SCHEMA) .field("decimal", Decimal.schema(0)) .field("array", SchemaBuilder.array(Schema.INT32_SCHEMA)) .field("map", SchemaBuilder.map(Schema.STRING_SCHEMA, Schema.STRING_SCHEMA)) .build(); final Struct value = new Struct(schema); value.put("magic", 42); value.put("bool", true); value.put("byte", (byte) 42); value.put("short", (short) 42); value.put("int", 42); value.put("long", 42L); value.put("float", 42f); value.put("double", 42d); value.put("string", "hmm"); value.put("date", new Date()); value.put("time", new Date()); value.put("timestamp", new Date()); value.put("decimal", new BigDecimal(42)); value.put("array", Arrays.asList(1, 2, 3)); value.put("map", Collections.singletonMap("what", "what")); final List<String> maskFields = new ArrayList<>(schema.fields().size()); for (Field field: schema.fields()) { if (!field.name().equals("magic")) { maskFields.add(field.name()); } } final Struct updatedValue = (Struct) transform(maskFields).apply(record(schema, value)).value(); assertEquals(42, updatedValue.get("magic")); assertEquals(false, updatedValue.get("bool")); assertEquals((byte) 0, updatedValue.get("byte")); assertEquals((short) 0, updatedValue.get("short")); assertEquals(0, updatedValue.get("int")); assertEquals(0L, updatedValue.get("long")); assertEquals(0f, updatedValue.get("float")); assertEquals(0d, updatedValue.get("double")); assertEquals("", updatedValue.get("string")); assertEquals(new Date(0), updatedValue.get("date")); assertEquals(new Date(0), updatedValue.get("time")); assertEquals(new Date(0), updatedValue.get("timestamp")); assertEquals(BigDecimal.ZERO, updatedValue.get("decimal")); assertEquals(Collections.emptyList(), updatedValue.get("array")); assertEquals(Collections.emptyMap(), updatedValue.get("map")); }
@Override public R apply(R record) { if (operatingSchema(record) == null) { return applySchemaless(record); } else { return applyWithSchema(record); } }
MaskField implements Transformation<R> { @Override public R apply(R record) { if (operatingSchema(record) == null) { return applySchemaless(record); } else { return applyWithSchema(record); } } }
MaskField implements Transformation<R> { @Override public R apply(R record) { if (operatingSchema(record) == null) { return applySchemaless(record); } else { return applyWithSchema(record); } } }
MaskField implements Transformation<R> { @Override public R apply(R record) { if (operatingSchema(record) == null) { return applySchemaless(record); } else { return applyWithSchema(record); } } @Override void configure(Map<String, ?> props); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); }
MaskField implements Transformation<R> { @Override public R apply(R record) { if (operatingSchema(record) == null) { return applySchemaless(record); } else { return applyWithSchema(record); } } @Override void configure(Map<String, ?> props); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); static final String OVERVIEW_DOC; static final ConfigDef CONFIG_DEF; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullSelectorOnToStream() throws Exception { table.toStream(null); }
@Override public KStream<K, V> toStream() { String name = topology.newName(TOSTREAM_NAME); topology.addProcessor(name, new KStreamMapValues<K, Change<V>, V>(new ValueMapper<Change<V>, V>() { @Override public V apply(Change<V> change) { return change.newValue; } }), this.name); return new KStreamImpl<>(topology, name, sourceNodes, false); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KStream<K, V> toStream() { String name = topology.newName(TOSTREAM_NAME); topology.addProcessor(name, new KStreamMapValues<K, Change<V>, V>(new ValueMapper<Change<V>, V>() { @Override public V apply(Change<V> change) { return change.newValue; } }), this.name); return new KStreamImpl<>(topology, name, sourceNodes, false); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KStream<K, V> toStream() { String name = topology.newName(TOSTREAM_NAME); topology.addProcessor(name, new KStreamMapValues<K, Change<V>, V>(new ValueMapper<Change<V>, V>() { @Override public V apply(Change<V> change) { return change.newValue; } }), this.name); return new KStreamImpl<>(topology, name, sourceNodes, false); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KStream<K, V> toStream() { String name = topology.newName(TOSTREAM_NAME); topology.addProcessor(name, new KStreamMapValues<K, Change<V>, V>(new ValueMapper<Change<V>, V>() { @Override public V apply(Change<V> change) { return change.newValue; } }), this.name); return new KStreamImpl<>(topology, name, sourceNodes, false); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KStream<K, V> toStream() { String name = topology.newName(TOSTREAM_NAME); topology.addProcessor(name, new KStreamMapValues<K, Change<V>, V>(new ValueMapper<Change<V>, V>() { @Override public V apply(Change<V> change) { return change.newValue; } }), this.name); return new KStreamImpl<>(topology, name, sourceNodes, false); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullTopicOnTo() throws Exception { table.to(null); }
@Override public void to(String topic) { to(null, null, null, topic); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullPredicateOnFilter() throws Exception { table.filter(null); }
@Override public KTable<K, V> filter(final Predicate<? super K, ? super V> predicate) { return filter(predicate, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> filter(final Predicate<? super K, ? super V> predicate) { return filter(predicate, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> filter(final Predicate<? super K, ? super V> predicate) { return filter(predicate, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> filter(final Predicate<? super K, ? super V> predicate) { return filter(predicate, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> filter(final Predicate<? super K, ? super V> predicate) { return filter(predicate, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullPredicateOnFilterNot() throws Exception { table.filterNot(null); }
@Override public KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate) { return filterNot(predicate, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate) { return filterNot(predicate, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate) { return filterNot(predicate, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate) { return filterNot(predicate, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate) { return filterNot(predicate, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullMapperOnMapValues() throws Exception { table.mapValues(null); }
@Override public <V1> KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper) { return mapValues(mapper, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1> KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper) { return mapValues(mapper, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1> KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper) { return mapValues(mapper, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1> KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper) { return mapValues(mapper, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1> KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper) { return mapValues(mapper, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullFilePathOnWriteAsText() throws Exception { table.writeAsText(null); }
@Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = TopologyBuilderException.class) public void shouldNotAllowEmptyFilePathOnWriteAsText() throws Exception { table.writeAsText("\t \t"); }
@Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullActionOnForEach() throws Exception { table.foreach(null); }
@Override public void foreach(final ForeachAction<? super K, ? super V> action) { Objects.requireNonNull(action, "action can't be null"); String name = topology.newName(FOREACH_NAME); KStreamPeek<K, Change<V>> processorSupplier = new KStreamPeek<>(new ForeachAction<K, Change<V>>() { @Override public void apply(K key, Change<V> value) { action.apply(key, value.newValue); } }, false); topology.addProcessor(name, processorSupplier, this.name); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void foreach(final ForeachAction<? super K, ? super V> action) { Objects.requireNonNull(action, "action can't be null"); String name = topology.newName(FOREACH_NAME); KStreamPeek<K, Change<V>> processorSupplier = new KStreamPeek<>(new ForeachAction<K, Change<V>>() { @Override public void apply(K key, Change<V> value) { action.apply(key, value.newValue); } }, false); topology.addProcessor(name, processorSupplier, this.name); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void foreach(final ForeachAction<? super K, ? super V> action) { Objects.requireNonNull(action, "action can't be null"); String name = topology.newName(FOREACH_NAME); KStreamPeek<K, Change<V>> processorSupplier = new KStreamPeek<>(new ForeachAction<K, Change<V>>() { @Override public void apply(K key, Change<V> value) { action.apply(key, value.newValue); } }, false); topology.addProcessor(name, processorSupplier, this.name); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void foreach(final ForeachAction<? super K, ? super V> action) { Objects.requireNonNull(action, "action can't be null"); String name = topology.newName(FOREACH_NAME); KStreamPeek<K, Change<V>> processorSupplier = new KStreamPeek<>(new ForeachAction<K, Change<V>>() { @Override public void apply(K key, Change<V> value) { action.apply(key, value.newValue); } }, false); topology.addProcessor(name, processorSupplier, this.name); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public void foreach(final ForeachAction<? super K, ? super V> action) { Objects.requireNonNull(action, "action can't be null"); String name = topology.newName(FOREACH_NAME); KStreamPeek<K, Change<V>> processorSupplier = new KStreamPeek<>(new ForeachAction<K, Change<V>>() { @Override public void apply(K key, Change<V> value) { action.apply(key, value.newValue); } }, false); topology.addProcessor(name, processorSupplier, this.name); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldAllowNullTopicInThrough() throws Exception { table.through((String) null, "store"); }
@Override public KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName) { final String internalStoreName = queryableStoreName != null ? queryableStoreName : topology.newStoreName(KTableImpl.TOSTREAM_NAME); to(keySerde, valSerde, partitioner, topic); return topology.table(keySerde, valSerde, topic, internalStoreName); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName) { final String internalStoreName = queryableStoreName != null ? queryableStoreName : topology.newStoreName(KTableImpl.TOSTREAM_NAME); to(keySerde, valSerde, partitioner, topic); return topology.table(keySerde, valSerde, topic, internalStoreName); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName) { final String internalStoreName = queryableStoreName != null ? queryableStoreName : topology.newStoreName(KTableImpl.TOSTREAM_NAME); to(keySerde, valSerde, partitioner, topic); return topology.table(keySerde, valSerde, topic, internalStoreName); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName) { final String internalStoreName = queryableStoreName != null ? queryableStoreName : topology.newStoreName(KTableImpl.TOSTREAM_NAME); to(keySerde, valSerde, partitioner, topic); return topology.table(keySerde, valSerde, topic, internalStoreName); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName) { final String internalStoreName = queryableStoreName != null ? queryableStoreName : topology.newStoreName(KTableImpl.TOSTREAM_NAME); to(keySerde, valSerde, partitioner, topic); return topology.table(keySerde, valSerde, topic, internalStoreName); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test public void shouldAllowNullStoreInThrough() throws Exception { table.through("topic", (String) null); }
@Override public KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName) { final String internalStoreName = queryableStoreName != null ? queryableStoreName : topology.newStoreName(KTableImpl.TOSTREAM_NAME); to(keySerde, valSerde, partitioner, topic); return topology.table(keySerde, valSerde, topic, internalStoreName); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName) { final String internalStoreName = queryableStoreName != null ? queryableStoreName : topology.newStoreName(KTableImpl.TOSTREAM_NAME); to(keySerde, valSerde, partitioner, topic); return topology.table(keySerde, valSerde, topic, internalStoreName); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName) { final String internalStoreName = queryableStoreName != null ? queryableStoreName : topology.newStoreName(KTableImpl.TOSTREAM_NAME); to(keySerde, valSerde, partitioner, topic); return topology.table(keySerde, valSerde, topic, internalStoreName); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName) { final String internalStoreName = queryableStoreName != null ? queryableStoreName : topology.newStoreName(KTableImpl.TOSTREAM_NAME); to(keySerde, valSerde, partitioner, topic); return topology.table(keySerde, valSerde, topic, internalStoreName); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName) { final String internalStoreName = queryableStoreName != null ? queryableStoreName : topology.newStoreName(KTableImpl.TOSTREAM_NAME); to(keySerde, valSerde, partitioner, topic); return topology.table(keySerde, valSerde, topic, internalStoreName); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullSelectorOnGroupBy() throws Exception { table.groupBy(null); }
@Override public <K1, V1> KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde) { Objects.requireNonNull(selector, "selector can't be null"); String selectName = topology.newName(SELECT_NAME); KTableProcessorSupplier<K, V, KeyValue<K1, V1>> selectSupplier = new KTableRepartitionMap<K, V, K1, V1>(this, selector); topology.addProcessor(selectName, selectSupplier, this.name); this.enableSendingOldValues(); return new KGroupedTableImpl<>(topology, selectName, this.name, keySerde, valueSerde); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <K1, V1> KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde) { Objects.requireNonNull(selector, "selector can't be null"); String selectName = topology.newName(SELECT_NAME); KTableProcessorSupplier<K, V, KeyValue<K1, V1>> selectSupplier = new KTableRepartitionMap<K, V, K1, V1>(this, selector); topology.addProcessor(selectName, selectSupplier, this.name); this.enableSendingOldValues(); return new KGroupedTableImpl<>(topology, selectName, this.name, keySerde, valueSerde); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <K1, V1> KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde) { Objects.requireNonNull(selector, "selector can't be null"); String selectName = topology.newName(SELECT_NAME); KTableProcessorSupplier<K, V, KeyValue<K1, V1>> selectSupplier = new KTableRepartitionMap<K, V, K1, V1>(this, selector); topology.addProcessor(selectName, selectSupplier, this.name); this.enableSendingOldValues(); return new KGroupedTableImpl<>(topology, selectName, this.name, keySerde, valueSerde); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <K1, V1> KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde) { Objects.requireNonNull(selector, "selector can't be null"); String selectName = topology.newName(SELECT_NAME); KTableProcessorSupplier<K, V, KeyValue<K1, V1>> selectSupplier = new KTableRepartitionMap<K, V, K1, V1>(this, selector); topology.addProcessor(selectName, selectSupplier, this.name); this.enableSendingOldValues(); return new KGroupedTableImpl<>(topology, selectName, this.name, keySerde, valueSerde); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <K1, V1> KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde) { Objects.requireNonNull(selector, "selector can't be null"); String selectName = topology.newName(SELECT_NAME); KTableProcessorSupplier<K, V, KeyValue<K1, V1>> selectSupplier = new KTableRepartitionMap<K, V, K1, V1>(this, selector); topology.addProcessor(selectName, selectSupplier, this.name); this.enableSendingOldValues(); return new KGroupedTableImpl<>(topology, selectName, this.name, keySerde, valueSerde); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullOtherTableOnJoin() throws Exception { table.join(null, MockValueJoiner.TOSTRING_JOINER); }
@Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test public void shouldAllowNullStoreInJoin() throws Exception { table.join(table, MockValueJoiner.TOSTRING_JOINER, null, (String) null); }
@Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullStoreSupplierInJoin() throws Exception { table.join(table, MockValueJoiner.TOSTRING_JOINER, (StateStoreSupplier<KeyValueStore>) null); }
@Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullStoreSupplierInLeftJoin() throws Exception { table.leftJoin(table, MockValueJoiner.TOSTRING_JOINER, (StateStoreSupplier<KeyValueStore>) null); }
@Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullStoreSupplierInOuterJoin() throws Exception { table.outerJoin(table, MockValueJoiner.TOSTRING_JOINER, (StateStoreSupplier<KeyValueStore>) null); }
@Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullJoinerJoin() throws Exception { table.join(table, null); }
@Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, false, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullOtherTableOnOuterJoin() throws Exception { table.outerJoin(null, MockValueJoiner.TOSTRING_JOINER); }
@Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullJoinerOnOuterJoin() throws Exception { table.outerJoin(table, null); }
@Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, true, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullJoinerOnLeftJoin() throws Exception { table.leftJoin(table, null); }
@Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test public void updateSchemaOfNonStruct() { Object value = new Integer(1); Object updatedValue = SetSchemaMetadata.updateSchemaIn(value, Schema.INT32_SCHEMA); assertSame(value, updatedValue); }
protected static Object updateSchemaIn(Object keyOrValue, Schema updatedSchema) { if (keyOrValue instanceof Struct) { Struct origStruct = (Struct) keyOrValue; Struct newStruct = new Struct(updatedSchema); for (Field field : updatedSchema.fields()) { newStruct.put(field, origStruct.get(field)); } return newStruct; } return keyOrValue; }
SetSchemaMetadata implements Transformation<R> { protected static Object updateSchemaIn(Object keyOrValue, Schema updatedSchema) { if (keyOrValue instanceof Struct) { Struct origStruct = (Struct) keyOrValue; Struct newStruct = new Struct(updatedSchema); for (Field field : updatedSchema.fields()) { newStruct.put(field, origStruct.get(field)); } return newStruct; } return keyOrValue; } }
SetSchemaMetadata implements Transformation<R> { protected static Object updateSchemaIn(Object keyOrValue, Schema updatedSchema) { if (keyOrValue instanceof Struct) { Struct origStruct = (Struct) keyOrValue; Struct newStruct = new Struct(updatedSchema); for (Field field : updatedSchema.fields()) { newStruct.put(field, origStruct.get(field)); } return newStruct; } return keyOrValue; } }
SetSchemaMetadata implements Transformation<R> { protected static Object updateSchemaIn(Object keyOrValue, Schema updatedSchema) { if (keyOrValue instanceof Struct) { Struct origStruct = (Struct) keyOrValue; Struct newStruct = new Struct(updatedSchema); for (Field field : updatedSchema.fields()) { newStruct.put(field, origStruct.get(field)); } return newStruct; } return keyOrValue; } @Override void configure(Map<String, ?> configs); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); }
SetSchemaMetadata implements Transformation<R> { protected static Object updateSchemaIn(Object keyOrValue, Schema updatedSchema) { if (keyOrValue instanceof Struct) { Struct origStruct = (Struct) keyOrValue; Struct newStruct = new Struct(updatedSchema); for (Field field : updatedSchema.fields()) { newStruct.put(field, origStruct.get(field)); } return newStruct; } return keyOrValue; } @Override void configure(Map<String, ?> configs); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); static final String OVERVIEW_DOC; static final ConfigDef CONFIG_DEF; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullOtherTableOnLeftJoin() throws Exception { table.leftJoin(null, MockValueJoiner.TOSTRING_JOINER); }
@Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); }
KTableImpl extends AbstractStream<K> implements KTable<K, V> { @Override public <V1, R> KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner) { return doJoin(other, joiner, true, false, null, (String) null); } KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); KTableImpl(KStreamBuilder topology, String name, ProcessorSupplier<?, ?> processorSupplier, final Serde<K> keySerde, final Serde<V> valSerde, Set<String> sourceNodes, final String queryableStoreName, boolean isQueryable); @Override String queryableStoreName(); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filter(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final String queryableStoreName); @Override KTable<K, V> filterNot(final Predicate<? super K, ? super V> predicate, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final String queryableStoreName); @Override KTable<K, V1> mapValues(final ValueMapper<? super V, ? extends V1> mapper, final Serde<V1> valueSerde, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override void foreach(final ForeachAction<? super K, ? super V> action); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final Serde<K> keySerde, final Serde<V> valSerde, final String topic); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final String queryableStoreName); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KTable<K, V> through(final String topic, final String queryableStoreName); @Override KTable<K, V> through(final String topic, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, V> through(final String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> toStream(); @Override KStream<K1, V> toStream(KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> outerJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<R> joinSerde, final String queryableStoreName); @Override KTable<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final StateStoreSupplier<KeyValueStore> storeSupplier); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector, Serde<K1> keySerde, Serde<V1> valueSerde); @Override KGroupedTable<K1, V1> groupBy(KeyValueMapper<? super K, ? super V, KeyValue<K1, V1>> selector); static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String MERGE_NAME; static final String SOURCE_NAME; static final String STATE_STORE_NAME; }
@Test public void testCopartitioning() { Random rand = new Random(); DefaultPartitioner defaultPartitioner = new DefaultPartitioner(); WindowedSerializer<Integer> windowedSerializer = new WindowedSerializer<>(intSerializer); WindowedStreamPartitioner<Integer, String> streamPartitioner = new WindowedStreamPartitioner<>(topicName, windowedSerializer); for (int k = 0; k < 10; k++) { Integer key = rand.nextInt(); byte[] keyBytes = intSerializer.serialize(topicName, key); String value = key.toString(); byte[] valueBytes = stringSerializer.serialize(topicName, value); Integer expected = defaultPartitioner.partition("topic", key, keyBytes, value, valueBytes, cluster); for (int w = 1; w < 10; w++) { TimeWindow window = new TimeWindow(10 * w, 20 * w); Windowed<Integer> windowedKey = new Windowed<>(key, window); Integer actual = streamPartitioner.partition(windowedKey, value, infos.size()); assertEquals(expected, actual); } } }
public Integer partition(final Windowed<K> windowedKey, final V value, final int numPartitions) { final byte[] keyBytes = serializer.serializeBaseKey(topic, windowedKey); return toPositive(Utils.murmur2(keyBytes)) % numPartitions; }
WindowedStreamPartitioner implements StreamPartitioner<Windowed<K>, V> { public Integer partition(final Windowed<K> windowedKey, final V value, final int numPartitions) { final byte[] keyBytes = serializer.serializeBaseKey(topic, windowedKey); return toPositive(Utils.murmur2(keyBytes)) % numPartitions; } }
WindowedStreamPartitioner implements StreamPartitioner<Windowed<K>, V> { public Integer partition(final Windowed<K> windowedKey, final V value, final int numPartitions) { final byte[] keyBytes = serializer.serializeBaseKey(topic, windowedKey); return toPositive(Utils.murmur2(keyBytes)) % numPartitions; } WindowedStreamPartitioner(final String topic, final WindowedSerializer<K> serializer); }
WindowedStreamPartitioner implements StreamPartitioner<Windowed<K>, V> { public Integer partition(final Windowed<K> windowedKey, final V value, final int numPartitions) { final byte[] keyBytes = serializer.serializeBaseKey(topic, windowedKey); return toPositive(Utils.murmur2(keyBytes)) % numPartitions; } WindowedStreamPartitioner(final String topic, final WindowedSerializer<K> serializer); Integer partition(final Windowed<K> windowedKey, final V value, final int numPartitions); }
WindowedStreamPartitioner implements StreamPartitioner<Windowed<K>, V> { public Integer partition(final Windowed<K> windowedKey, final V value, final int numPartitions) { final byte[] keyBytes = serializer.serializeBaseKey(topic, windowedKey); return toPositive(Utils.murmur2(keyBytes)) % numPartitions; } WindowedStreamPartitioner(final String topic, final WindowedSerializer<K> serializer); Integer partition(final Windowed<K> windowedKey, final V value, final int numPartitions); }
@Test public void testJoin() throws Exception { KStreamBuilder builder = new KStreamBuilder(); final int[] expectedKeys = new int[]{0, 1, 2, 3}; KTable<Integer, String> table1; KTable<Integer, String> table2; KTable<Integer, String> joined; MockProcessorSupplier<Integer, String> processor; processor = new MockProcessorSupplier<>(); table1 = builder.table(intSerde, stringSerde, topic1, storeName1); table2 = builder.table(intSerde, stringSerde, topic2, storeName2); joined = table1.outerJoin(table2, MockValueJoiner.TOSTRING_JOINER); joined.toStream().process(processor); Collection<Set<String>> copartitionGroups = builder.copartitionGroups(); assertEquals(1, copartitionGroups.size()); assertEquals(new HashSet<>(Arrays.asList(topic1, topic2)), copartitionGroups.iterator().next()); KTableValueGetterSupplier<Integer, String> getterSupplier = ((KTableImpl<Integer, String, String>) joined).valueGetterSupplier(); driver = new KStreamTestDriver(builder, stateDir); KTableValueGetter<Integer, String> getter = getterSupplier.get(); getter.init(driver.context()); for (int i = 0; i < 2; i++) { driver.process(topic1, expectedKeys[i], "X" + expectedKeys[i]); } driver.process(topic1, null, "SomeVal"); driver.flushState(); processor.checkAndClearProcessResult("0:X0+null", "1:X1+null"); checkJoinedValues(getter, kv(0, "X0+null"), kv(1, "X1+null"), kv(2, null), kv(3, null)); for (int i = 0; i < 2; i++) { driver.process(topic2, expectedKeys[i], "Y" + expectedKeys[i]); } driver.process(topic2, null, "AnotherVal"); driver.flushState(); processor.checkAndClearProcessResult("0:X0+Y0", "1:X1+Y1"); checkJoinedValues(getter, kv(0, "X0+Y0"), kv(1, "X1+Y1"), kv(2, null), kv(3, null)); for (int expectedKey : expectedKeys) { driver.process(topic1, expectedKey, "X" + expectedKey); } driver.flushState(); processor.checkAndClearProcessResult("0:X0+Y0", "1:X1+Y1", "2:X2+null", "3:X3+null"); checkJoinedValues(getter, kv(0, "X0+Y0"), kv(1, "X1+Y1"), kv(2, "X2+null"), kv(3, "X3+null")); for (int expectedKey : expectedKeys) { driver.process(topic2, expectedKey, "YY" + expectedKey); } driver.flushState(); processor.checkAndClearProcessResult("0:X0+YY0", "1:X1+YY1", "2:X2+YY2", "3:X3+YY3"); checkJoinedValues(getter, kv(0, "X0+YY0"), kv(1, "X1+YY1"), kv(2, "X2+YY2"), kv(3, "X3+YY3")); for (int expectedKey : expectedKeys) { driver.process(topic1, expectedKey, "X" + expectedKey); } driver.flushState(); processor.checkAndClearProcessResult("0:X0+YY0", "1:X1+YY1", "2:X2+YY2", "3:X3+YY3"); checkJoinedValues(getter, kv(0, "X0+YY0"), kv(1, "X1+YY1"), kv(2, "X2+YY2"), kv(3, "X3+YY3")); for (int i = 0; i < 2; i++) { driver.process(topic2, expectedKeys[i], null); } driver.flushState(); processor.checkAndClearProcessResult("0:X0+null", "1:X1+null"); checkJoinedValues(getter, kv(0, "X0+null"), kv(1, "X1+null"), kv(2, "X2+YY2"), kv(3, "X3+YY3")); for (int expectedKey : expectedKeys) { driver.process(topic1, expectedKey, "XX" + expectedKey); } driver.flushState(); processor.checkAndClearProcessResult("0:XX0+null", "1:XX1+null", "2:XX2+YY2", "3:XX3+YY3"); checkJoinedValues(getter, kv(0, "XX0+null"), kv(1, "XX1+null"), kv(2, "XX2+YY2"), kv(3, "XX3+YY3")); for (int i = 1; i < 3; i++) { driver.process(topic1, expectedKeys[i], null); } driver.flushState(); processor.checkAndClearProcessResult("1:null", "2:null+YY2"); checkJoinedValues(getter, kv(0, "XX0+null"), kv(1, null), kv(2, "null+YY2"), kv(3, "XX3+YY3")); }
@Override public Processor<K, Change<V1>> get() { return new KTableKTableOuterJoinProcessor(valueGetterSupplier2.get()); }
KTableKTableOuterJoin extends KTableKTableAbstractJoin<K, R, V1, V2> { @Override public Processor<K, Change<V1>> get() { return new KTableKTableOuterJoinProcessor(valueGetterSupplier2.get()); } }
KTableKTableOuterJoin extends KTableKTableAbstractJoin<K, R, V1, V2> { @Override public Processor<K, Change<V1>> get() { return new KTableKTableOuterJoinProcessor(valueGetterSupplier2.get()); } KTableKTableOuterJoin(KTableImpl<K, ?, V1> table1, KTableImpl<K, ?, V2> table2, ValueJoiner<? super V1, ? super V2, ? extends R> joiner); }
KTableKTableOuterJoin extends KTableKTableAbstractJoin<K, R, V1, V2> { @Override public Processor<K, Change<V1>> get() { return new KTableKTableOuterJoinProcessor(valueGetterSupplier2.get()); } KTableKTableOuterJoin(KTableImpl<K, ?, V1> table1, KTableImpl<K, ?, V2> table2, ValueJoiner<? super V1, ? super V2, ? extends R> joiner); @Override Processor<K, Change<V1>> get(); @Override KTableValueGetterSupplier<K, R> view(); }
KTableKTableOuterJoin extends KTableKTableAbstractJoin<K, R, V1, V2> { @Override public Processor<K, Change<V1>> get() { return new KTableKTableOuterJoinProcessor(valueGetterSupplier2.get()); } KTableKTableOuterJoin(KTableImpl<K, ?, V1> table1, KTableImpl<K, ?, V2> table2, ValueJoiner<? super V1, ? super V2, ? extends R> joiner); @Override Processor<K, Change<V1>> get(); @Override KTableValueGetterSupplier<K, R> view(); }
@Test public void shouldForwardToCorrectProcessorNodeWhenMultiCacheEvictions() throws Exception { final String tableOne = "tableOne"; final String tableTwo = "tableTwo"; final KStreamBuilder builder = new KStreamBuilder(); final String reduceTopic = "TestDriver-reducer-store-repartition"; final Map<String, Long> reduceResults = new HashMap<>(); final KTable<String, String> one = builder.table(Serdes.String(), Serdes.String(), tableOne, tableOne); final KTable<Long, String> two = builder.table(Serdes.Long(), Serdes.String(), tableTwo, tableTwo); final KTable<String, Long> reduce = two.groupBy(new KeyValueMapper<Long, String, KeyValue<String, Long>>() { @Override public KeyValue<String, Long> apply(final Long key, final String value) { return new KeyValue<>(value, key); } }, Serdes.String(), Serdes.Long()) .reduce(new Reducer<Long>() { @Override public Long apply(final Long value1, final Long value2) { return value1 + value2; } }, new Reducer<Long>() { @Override public Long apply(final Long value1, final Long value2) { return value1 - value2; } }, "reducer-store"); reduce.foreach(new ForeachAction<String, Long>() { @Override public void apply(final String key, final Long value) { reduceResults.put(key, value); } }); one.leftJoin(reduce, new ValueJoiner<String, Long, String>() { @Override public String apply(final String value1, final Long value2) { return value1 + ":" + value2; } }) .mapValues(new ValueMapper<String, String>() { @Override public String apply(final String value) { return value; } }); driver = new KStreamTestDriver(builder, stateDir, 111); driver.process(reduceTopic, "1", new Change<>(1L, null)); driver.process("tableOne", "2", "2"); driver.process(reduceTopic, "2", new Change<>(2L, null)); driver.process(reduceTopic, "2", new Change<>(2L, null)); assertEquals(Long.valueOf(2L), reduceResults.get("2")); driver.process("tableOne", "1", "5"); assertEquals(Long.valueOf(4L), reduceResults.get("2")); }
@Override public Processor<K, Change<V>> get() { return new KTableAggregateProcessor(); }
KTableAggregate implements KTableProcessorSupplier<K, V, T> { @Override public Processor<K, Change<V>> get() { return new KTableAggregateProcessor(); } }
KTableAggregate implements KTableProcessorSupplier<K, V, T> { @Override public Processor<K, Change<V>> get() { return new KTableAggregateProcessor(); } KTableAggregate(String storeName, Initializer<T> initializer, Aggregator<? super K, ? super V, T> add, Aggregator<? super K, ? super V, T> remove); }
KTableAggregate implements KTableProcessorSupplier<K, V, T> { @Override public Processor<K, Change<V>> get() { return new KTableAggregateProcessor(); } KTableAggregate(String storeName, Initializer<T> initializer, Aggregator<? super K, ? super V, T> add, Aggregator<? super K, ? super V, T> remove); @Override void enableSendingOldValues(); @Override Processor<K, Change<V>> get(); @Override KTableValueGetterSupplier<K, T> view(); }
KTableAggregate implements KTableProcessorSupplier<K, V, T> { @Override public Processor<K, Change<V>> get() { return new KTableAggregateProcessor(); } KTableAggregate(String storeName, Initializer<T> initializer, Aggregator<? super K, ? super V, T> add, Aggregator<? super K, ? super V, T> remove); @Override void enableSendingOldValues(); @Override Processor<K, Change<V>> get(); @Override KTableValueGetterSupplier<K, T> view(); }
@Test public void testFlatMap() { KStreamBuilder builder = new KStreamBuilder(); KeyValueMapper<Number, Object, Iterable<KeyValue<String, String>>> mapper = new KeyValueMapper<Number, Object, Iterable<KeyValue<String, String>>>() { @Override public Iterable<KeyValue<String, String>> apply(Number key, Object value) { ArrayList<KeyValue<String, String>> result = new ArrayList<>(); for (int i = 0; i < key.intValue(); i++) { result.add(KeyValue.pair(Integer.toString(key.intValue() * 10 + i), value.toString())); } return result; } }; final int[] expectedKeys = {0, 1, 2, 3}; KStream<Integer, String> stream; MockProcessorSupplier<String, String> processor; processor = new MockProcessorSupplier<>(); stream = builder.stream(Serdes.Integer(), Serdes.String(), topicName); stream.flatMap(mapper).process(processor); driver = new KStreamTestDriver(builder); for (int expectedKey : expectedKeys) { driver.process(topicName, expectedKey, "V" + expectedKey); } assertEquals(6, processor.processed.size()); String[] expected = {"10:V1", "20:V2", "21:V2", "30:V3", "31:V3", "32:V3"}; for (int i = 0; i < expected.length; i++) { assertEquals(expected[i], processor.processed.get(i)); } }
@Override public Processor<K, V> get() { return new KStreamFlatMapProcessor(); }
KStreamFlatMap implements ProcessorSupplier<K, V> { @Override public Processor<K, V> get() { return new KStreamFlatMapProcessor(); } }
KStreamFlatMap implements ProcessorSupplier<K, V> { @Override public Processor<K, V> get() { return new KStreamFlatMapProcessor(); } KStreamFlatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); }
KStreamFlatMap implements ProcessorSupplier<K, V> { @Override public Processor<K, V> get() { return new KStreamFlatMapProcessor(); } KStreamFlatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override Processor<K, V> get(); }
KStreamFlatMap implements ProcessorSupplier<K, V> { @Override public Processor<K, V> get() { return new KStreamFlatMapProcessor(); } KStreamFlatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override Processor<K, V> get(); }
@Test public void testFlatMapValues() { KStreamBuilder builder = new KStreamBuilder(); ValueMapper<Number, Iterable<String>> mapper = new ValueMapper<Number, Iterable<String>>() { @Override public Iterable<String> apply(Number value) { ArrayList<String> result = new ArrayList<String>(); result.add("v" + value); result.add("V" + value); return result; } }; final int[] expectedKeys = {0, 1, 2, 3}; KStream<Integer, Integer> stream; MockProcessorSupplier<Integer, String> processor; processor = new MockProcessorSupplier<>(); stream = builder.stream(Serdes.Integer(), Serdes.Integer(), topicName); stream.flatMapValues(mapper).process(processor); driver = new KStreamTestDriver(builder); for (int expectedKey : expectedKeys) { driver.process(topicName, expectedKey, expectedKey); } assertEquals(8, processor.processed.size()); String[] expected = {"0:v0", "0:V0", "1:v1", "1:V1", "2:v2", "2:V2", "3:v3", "3:V3"}; for (int i = 0; i < expected.length; i++) { assertEquals(expected[i], processor.processed.get(i)); } }
@Override public Processor<K, V> get() { return new KStreamFlatMapValuesProcessor(); }
KStreamFlatMapValues implements ProcessorSupplier<K, V> { @Override public Processor<K, V> get() { return new KStreamFlatMapValuesProcessor(); } }
KStreamFlatMapValues implements ProcessorSupplier<K, V> { @Override public Processor<K, V> get() { return new KStreamFlatMapValuesProcessor(); } KStreamFlatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); }
KStreamFlatMapValues implements ProcessorSupplier<K, V> { @Override public Processor<K, V> get() { return new KStreamFlatMapValuesProcessor(); } KStreamFlatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override Processor<K, V> get(); }
KStreamFlatMapValues implements ProcessorSupplier<K, V> { @Override public Processor<K, V> get() { return new KStreamFlatMapValuesProcessor(); } KStreamFlatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override Processor<K, V> get(); }
@Test public void testToWithNullValueSerdeDoesntNPE() { final KStreamBuilder builder = new KStreamBuilder(); final KStream<String, String> inputStream = builder.stream(stringSerde, stringSerde, "input"); inputStream.to(stringSerde, null, "output"); }
@Override public void to(String topic) { to(null, null, null, topic); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullPredicateOnFilter() throws Exception { testStream.filter(null); }
@Override public KStream<K, V> filter(Predicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate, "predicate can't be null"); String name = topology.newName(FILTER_NAME); topology.addProcessor(name, new KStreamFilter<>(predicate, false), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> filter(Predicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate, "predicate can't be null"); String name = topology.newName(FILTER_NAME); topology.addProcessor(name, new KStreamFilter<>(predicate, false), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> filter(Predicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate, "predicate can't be null"); String name = topology.newName(FILTER_NAME); topology.addProcessor(name, new KStreamFilter<>(predicate, false), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> filter(Predicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate, "predicate can't be null"); String name = topology.newName(FILTER_NAME); topology.addProcessor(name, new KStreamFilter<>(predicate, false), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> filter(Predicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate, "predicate can't be null"); String name = topology.newName(FILTER_NAME); topology.addProcessor(name, new KStreamFilter<>(predicate, false), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullPredicateOnFilterNot() throws Exception { testStream.filterNot(null); }
@Override public KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate, "predicate can't be null"); String name = topology.newName(FILTER_NAME); topology.addProcessor(name, new KStreamFilter<>(predicate, true), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate, "predicate can't be null"); String name = topology.newName(FILTER_NAME); topology.addProcessor(name, new KStreamFilter<>(predicate, true), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate, "predicate can't be null"); String name = topology.newName(FILTER_NAME); topology.addProcessor(name, new KStreamFilter<>(predicate, true), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate, "predicate can't be null"); String name = topology.newName(FILTER_NAME); topology.addProcessor(name, new KStreamFilter<>(predicate, true), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate, "predicate can't be null"); String name = topology.newName(FILTER_NAME); topology.addProcessor(name, new KStreamFilter<>(predicate, true), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullMapperOnSelectKey() throws Exception { testStream.selectKey(null); }
@Override public <K1> KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); return new KStreamImpl<>(topology, internalSelectKey(mapper), sourceNodes, true); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1> KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); return new KStreamImpl<>(topology, internalSelectKey(mapper), sourceNodes, true); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1> KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); return new KStreamImpl<>(topology, internalSelectKey(mapper), sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1> KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); return new KStreamImpl<>(topology, internalSelectKey(mapper), sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1> KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); return new KStreamImpl<>(topology, internalSelectKey(mapper), sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullMapperOnMap() throws Exception { testStream.map(null); }
@Override public <K1, V1> KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(MAP_NAME); topology.addProcessor(name, new KStreamMap<K, V, K1, V1>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, true); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(MAP_NAME); topology.addProcessor(name, new KStreamMap<K, V, K1, V1>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, true); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(MAP_NAME); topology.addProcessor(name, new KStreamMap<K, V, K1, V1>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(MAP_NAME); topology.addProcessor(name, new KStreamMap<K, V, K1, V1>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(MAP_NAME); topology.addProcessor(name, new KStreamMap<K, V, K1, V1>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullMapperOnMapValues() throws Exception { testStream.mapValues(null); }
@Override public <V1> KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(MAPVALUES_NAME); topology.addProcessor(name, new KStreamMapValues<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(MAPVALUES_NAME); topology.addProcessor(name, new KStreamMapValues<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(MAPVALUES_NAME); topology.addProcessor(name, new KStreamMapValues<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(MAPVALUES_NAME); topology.addProcessor(name, new KStreamMapValues<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(MAPVALUES_NAME); topology.addProcessor(name, new KStreamMapValues<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullFilePathOnWriteAsText() throws Exception { testStream.writeAsText(null); }
@Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = ConfigException.class) public void testConfigEmpty() { final Cast<SourceRecord> xform = new Cast.Key<>(); xform.configure(Collections.singletonMap(Cast.SPEC_CONFIG, "")); }
@Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); } }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); } }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); } @Override void configure(Map<String, ?> props); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); } @Override void configure(Map<String, ?> props); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); static final String OVERVIEW_DOC; static final String SPEC_CONFIG; static final ConfigDef CONFIG_DEF; }
@Test(expected = TopologyBuilderException.class) public void shouldNotAllowEmptyFilePathOnWriteAsText() throws Exception { testStream.writeAsText("\t \t"); }
@Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void writeAsText(String filePath) { writeAsText(filePath, null, null, null); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullMapperOnFlatMap() throws Exception { testStream.flatMap(null); }
@Override public <K1, V1> KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(FLATMAP_NAME); topology.addProcessor(name, new KStreamFlatMap<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, true); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(FLATMAP_NAME); topology.addProcessor(name, new KStreamFlatMap<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, true); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(FLATMAP_NAME); topology.addProcessor(name, new KStreamFlatMap<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(FLATMAP_NAME); topology.addProcessor(name, new KStreamFlatMap<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(FLATMAP_NAME); topology.addProcessor(name, new KStreamFlatMap<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullMapperOnFlatMapValues() throws Exception { testStream.flatMapValues(null); }
@Override public <V1> KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(FLATMAPVALUES_NAME); topology.addProcessor(name, new KStreamFlatMapValues<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(FLATMAPVALUES_NAME); topology.addProcessor(name, new KStreamFlatMapValues<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(FLATMAPVALUES_NAME); topology.addProcessor(name, new KStreamFlatMapValues<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(FLATMAPVALUES_NAME); topology.addProcessor(name, new KStreamFlatMapValues<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper) { Objects.requireNonNull(mapper, "mapper can't be null"); String name = topology.newName(FLATMAPVALUES_NAME); topology.addProcessor(name, new KStreamFlatMapValues<>(mapper), this.name); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = IllegalArgumentException.class) public void shouldHaveAtLeastOnPredicateWhenBranching() throws Exception { testStream.branch(); }
@Override @SuppressWarnings("unchecked") public KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates) { if (predicates.length == 0) { throw new IllegalArgumentException("you must provide at least one predicate"); } for (Predicate<? super K, ? super V> predicate : predicates) { Objects.requireNonNull(predicate, "predicates can't have null values"); } String branchName = topology.newName(BRANCH_NAME); topology.addProcessor(branchName, new KStreamBranch(predicates.clone()), this.name); KStream<K, V>[] branchChildren = (KStream<K, V>[]) Array.newInstance(KStream.class, predicates.length); for (int i = 0; i < predicates.length; i++) { String childName = topology.newName(BRANCHCHILD_NAME); topology.addProcessor(childName, new KStreamPassThrough<K, V>(), branchName); branchChildren[i] = new KStreamImpl<>(topology, childName, sourceNodes, this.repartitionRequired); } return branchChildren; }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override @SuppressWarnings("unchecked") public KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates) { if (predicates.length == 0) { throw new IllegalArgumentException("you must provide at least one predicate"); } for (Predicate<? super K, ? super V> predicate : predicates) { Objects.requireNonNull(predicate, "predicates can't have null values"); } String branchName = topology.newName(BRANCH_NAME); topology.addProcessor(branchName, new KStreamBranch(predicates.clone()), this.name); KStream<K, V>[] branchChildren = (KStream<K, V>[]) Array.newInstance(KStream.class, predicates.length); for (int i = 0; i < predicates.length; i++) { String childName = topology.newName(BRANCHCHILD_NAME); topology.addProcessor(childName, new KStreamPassThrough<K, V>(), branchName); branchChildren[i] = new KStreamImpl<>(topology, childName, sourceNodes, this.repartitionRequired); } return branchChildren; } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override @SuppressWarnings("unchecked") public KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates) { if (predicates.length == 0) { throw new IllegalArgumentException("you must provide at least one predicate"); } for (Predicate<? super K, ? super V> predicate : predicates) { Objects.requireNonNull(predicate, "predicates can't have null values"); } String branchName = topology.newName(BRANCH_NAME); topology.addProcessor(branchName, new KStreamBranch(predicates.clone()), this.name); KStream<K, V>[] branchChildren = (KStream<K, V>[]) Array.newInstance(KStream.class, predicates.length); for (int i = 0; i < predicates.length; i++) { String childName = topology.newName(BRANCHCHILD_NAME); topology.addProcessor(childName, new KStreamPassThrough<K, V>(), branchName); branchChildren[i] = new KStreamImpl<>(topology, childName, sourceNodes, this.repartitionRequired); } return branchChildren; } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override @SuppressWarnings("unchecked") public KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates) { if (predicates.length == 0) { throw new IllegalArgumentException("you must provide at least one predicate"); } for (Predicate<? super K, ? super V> predicate : predicates) { Objects.requireNonNull(predicate, "predicates can't have null values"); } String branchName = topology.newName(BRANCH_NAME); topology.addProcessor(branchName, new KStreamBranch(predicates.clone()), this.name); KStream<K, V>[] branchChildren = (KStream<K, V>[]) Array.newInstance(KStream.class, predicates.length); for (int i = 0; i < predicates.length; i++) { String childName = topology.newName(BRANCHCHILD_NAME); topology.addProcessor(childName, new KStreamPassThrough<K, V>(), branchName); branchChildren[i] = new KStreamImpl<>(topology, childName, sourceNodes, this.repartitionRequired); } return branchChildren; } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override @SuppressWarnings("unchecked") public KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates) { if (predicates.length == 0) { throw new IllegalArgumentException("you must provide at least one predicate"); } for (Predicate<? super K, ? super V> predicate : predicates) { Objects.requireNonNull(predicate, "predicates can't have null values"); } String branchName = topology.newName(BRANCH_NAME); topology.addProcessor(branchName, new KStreamBranch(predicates.clone()), this.name); KStream<K, V>[] branchChildren = (KStream<K, V>[]) Array.newInstance(KStream.class, predicates.length); for (int i = 0; i < predicates.length; i++) { String childName = topology.newName(BRANCHCHILD_NAME); topology.addProcessor(childName, new KStreamPassThrough<K, V>(), branchName); branchChildren[i] = new KStreamImpl<>(topology, childName, sourceNodes, this.repartitionRequired); } return branchChildren; } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldCantHaveNullPredicate() throws Exception { testStream.branch((Predicate) null); }
@Override @SuppressWarnings("unchecked") public KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates) { if (predicates.length == 0) { throw new IllegalArgumentException("you must provide at least one predicate"); } for (Predicate<? super K, ? super V> predicate : predicates) { Objects.requireNonNull(predicate, "predicates can't have null values"); } String branchName = topology.newName(BRANCH_NAME); topology.addProcessor(branchName, new KStreamBranch(predicates.clone()), this.name); KStream<K, V>[] branchChildren = (KStream<K, V>[]) Array.newInstance(KStream.class, predicates.length); for (int i = 0; i < predicates.length; i++) { String childName = topology.newName(BRANCHCHILD_NAME); topology.addProcessor(childName, new KStreamPassThrough<K, V>(), branchName); branchChildren[i] = new KStreamImpl<>(topology, childName, sourceNodes, this.repartitionRequired); } return branchChildren; }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override @SuppressWarnings("unchecked") public KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates) { if (predicates.length == 0) { throw new IllegalArgumentException("you must provide at least one predicate"); } for (Predicate<? super K, ? super V> predicate : predicates) { Objects.requireNonNull(predicate, "predicates can't have null values"); } String branchName = topology.newName(BRANCH_NAME); topology.addProcessor(branchName, new KStreamBranch(predicates.clone()), this.name); KStream<K, V>[] branchChildren = (KStream<K, V>[]) Array.newInstance(KStream.class, predicates.length); for (int i = 0; i < predicates.length; i++) { String childName = topology.newName(BRANCHCHILD_NAME); topology.addProcessor(childName, new KStreamPassThrough<K, V>(), branchName); branchChildren[i] = new KStreamImpl<>(topology, childName, sourceNodes, this.repartitionRequired); } return branchChildren; } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override @SuppressWarnings("unchecked") public KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates) { if (predicates.length == 0) { throw new IllegalArgumentException("you must provide at least one predicate"); } for (Predicate<? super K, ? super V> predicate : predicates) { Objects.requireNonNull(predicate, "predicates can't have null values"); } String branchName = topology.newName(BRANCH_NAME); topology.addProcessor(branchName, new KStreamBranch(predicates.clone()), this.name); KStream<K, V>[] branchChildren = (KStream<K, V>[]) Array.newInstance(KStream.class, predicates.length); for (int i = 0; i < predicates.length; i++) { String childName = topology.newName(BRANCHCHILD_NAME); topology.addProcessor(childName, new KStreamPassThrough<K, V>(), branchName); branchChildren[i] = new KStreamImpl<>(topology, childName, sourceNodes, this.repartitionRequired); } return branchChildren; } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override @SuppressWarnings("unchecked") public KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates) { if (predicates.length == 0) { throw new IllegalArgumentException("you must provide at least one predicate"); } for (Predicate<? super K, ? super V> predicate : predicates) { Objects.requireNonNull(predicate, "predicates can't have null values"); } String branchName = topology.newName(BRANCH_NAME); topology.addProcessor(branchName, new KStreamBranch(predicates.clone()), this.name); KStream<K, V>[] branchChildren = (KStream<K, V>[]) Array.newInstance(KStream.class, predicates.length); for (int i = 0; i < predicates.length; i++) { String childName = topology.newName(BRANCHCHILD_NAME); topology.addProcessor(childName, new KStreamPassThrough<K, V>(), branchName); branchChildren[i] = new KStreamImpl<>(topology, childName, sourceNodes, this.repartitionRequired); } return branchChildren; } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override @SuppressWarnings("unchecked") public KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates) { if (predicates.length == 0) { throw new IllegalArgumentException("you must provide at least one predicate"); } for (Predicate<? super K, ? super V> predicate : predicates) { Objects.requireNonNull(predicate, "predicates can't have null values"); } String branchName = topology.newName(BRANCH_NAME); topology.addProcessor(branchName, new KStreamBranch(predicates.clone()), this.name); KStream<K, V>[] branchChildren = (KStream<K, V>[]) Array.newInstance(KStream.class, predicates.length); for (int i = 0; i < predicates.length; i++) { String childName = topology.newName(BRANCHCHILD_NAME); topology.addProcessor(childName, new KStreamPassThrough<K, V>(), branchName); branchChildren[i] = new KStreamImpl<>(topology, childName, sourceNodes, this.repartitionRequired); } return branchChildren; } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullTopicOnThrough() throws Exception { testStream.through(null); }
@Override public KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic) { to(keySerde, valSerde, partitioner, topic); return topology.stream(keySerde, valSerde, topic); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic) { to(keySerde, valSerde, partitioner, topic); return topology.stream(keySerde, valSerde, topic); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic) { to(keySerde, valSerde, partitioner, topic); return topology.stream(keySerde, valSerde, topic); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic) { to(keySerde, valSerde, partitioner, topic); return topology.stream(keySerde, valSerde, topic); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic) { to(keySerde, valSerde, partitioner, topic); return topology.stream(keySerde, valSerde, topic); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullTopicOnTo() throws Exception { testStream.to(null); }
@Override public void to(String topic) { to(null, null, null, topic); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void to(String topic) { to(null, null, null, topic); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullTransformSupplierOnTransform() throws Exception { testStream.transform(null); }
@Override public <K1, V1> KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames) { Objects.requireNonNull(transformerSupplier, "transformerSupplier can't be null"); String name = topology.newName(TRANSFORM_NAME); topology.addProcessor(name, new KStreamTransform<>(transformerSupplier), this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); return new KStreamImpl<>(topology, name, sourceNodes, true); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames) { Objects.requireNonNull(transformerSupplier, "transformerSupplier can't be null"); String name = topology.newName(TRANSFORM_NAME); topology.addProcessor(name, new KStreamTransform<>(transformerSupplier), this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); return new KStreamImpl<>(topology, name, sourceNodes, true); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames) { Objects.requireNonNull(transformerSupplier, "transformerSupplier can't be null"); String name = topology.newName(TRANSFORM_NAME); topology.addProcessor(name, new KStreamTransform<>(transformerSupplier), this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); return new KStreamImpl<>(topology, name, sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames) { Objects.requireNonNull(transformerSupplier, "transformerSupplier can't be null"); String name = topology.newName(TRANSFORM_NAME); topology.addProcessor(name, new KStreamTransform<>(transformerSupplier), this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); return new KStreamImpl<>(topology, name, sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1, V1> KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames) { Objects.requireNonNull(transformerSupplier, "transformerSupplier can't be null"); String name = topology.newName(TRANSFORM_NAME); topology.addProcessor(name, new KStreamTransform<>(transformerSupplier), this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); return new KStreamImpl<>(topology, name, sourceNodes, true); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullTransformSupplierOnTransformValues() throws Exception { testStream.transformValues(null); }
@Override public <V1> KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames) { Objects.requireNonNull(valueTransformerSupplier, "valueTransformSupplier can't be null"); String name = topology.newName(TRANSFORMVALUES_NAME); topology.addProcessor(name, new KStreamTransformValues<>(valueTransformerSupplier), this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames) { Objects.requireNonNull(valueTransformerSupplier, "valueTransformSupplier can't be null"); String name = topology.newName(TRANSFORMVALUES_NAME); topology.addProcessor(name, new KStreamTransformValues<>(valueTransformerSupplier), this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames) { Objects.requireNonNull(valueTransformerSupplier, "valueTransformSupplier can't be null"); String name = topology.newName(TRANSFORMVALUES_NAME); topology.addProcessor(name, new KStreamTransformValues<>(valueTransformerSupplier), this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames) { Objects.requireNonNull(valueTransformerSupplier, "valueTransformSupplier can't be null"); String name = topology.newName(TRANSFORMVALUES_NAME); topology.addProcessor(name, new KStreamTransformValues<>(valueTransformerSupplier), this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1> KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames) { Objects.requireNonNull(valueTransformerSupplier, "valueTransformSupplier can't be null"); String name = topology.newName(TRANSFORMVALUES_NAME); topology.addProcessor(name, new KStreamTransformValues<>(valueTransformerSupplier), this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); return new KStreamImpl<>(topology, name, sourceNodes, this.repartitionRequired); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullProcessSupplier() throws Exception { testStream.process(null); }
@Override public void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames) { String name = topology.newName(PROCESSOR_NAME); topology.addProcessor(name, processorSupplier, this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames) { String name = topology.newName(PROCESSOR_NAME); topology.addProcessor(name, processorSupplier, this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames) { String name = topology.newName(PROCESSOR_NAME); topology.addProcessor(name, processorSupplier, this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames) { String name = topology.newName(PROCESSOR_NAME); topology.addProcessor(name, processorSupplier, this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames) { String name = topology.newName(PROCESSOR_NAME); topology.addProcessor(name, processorSupplier, this.name); topology.connectProcessorAndStateStores(name, stateStoreNames); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = ConfigException.class) public void testConfigInvalidSchemaType() { final Cast<SourceRecord> xform = new Cast.Key<>(); xform.configure(Collections.singletonMap(Cast.SPEC_CONFIG, "foo:faketype")); }
@Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); } }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); } }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); } @Override void configure(Map<String, ?> props); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); } @Override void configure(Map<String, ?> props); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); static final String OVERVIEW_DOC; static final String SPEC_CONFIG; static final ConfigDef CONFIG_DEF; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullOtherStreamOnJoin() throws Exception { testStream.join(null, MockValueJoiner.TOSTRING_JOINER, JoinWindows.of(10)); }
@Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullValueJoinerOnJoin() throws Exception { testStream.join(testStream, null, JoinWindows.of(10)); }
@Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullJoinWindowsOnJoin() throws Exception { testStream.join(testStream, MockValueJoiner.TOSTRING_JOINER, null); }
@Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValueSerde, otherValueSerde, new KStreamImplJoin(false, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullTableOnTableJoin() throws Exception { testStream.leftJoin((KTable) null, MockValueJoiner.TOSTRING_JOINER); }
@Override public <V1, R> KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValSerde, otherValueSerde, new KStreamImplJoin(true, false)); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValSerde, otherValueSerde, new KStreamImplJoin(true, false)); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValSerde, otherValueSerde, new KStreamImplJoin(true, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValSerde, otherValueSerde, new KStreamImplJoin(true, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValSerde, otherValueSerde, new KStreamImplJoin(true, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullValueMapperOnTableJoin() throws Exception { testStream.leftJoin(builder.table(Serdes.String(), Serdes.String(), "topic", "store"), null); }
@Override public <V1, R> KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValSerde, otherValueSerde, new KStreamImplJoin(true, false)); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValSerde, otherValueSerde, new KStreamImplJoin(true, false)); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValSerde, otherValueSerde, new KStreamImplJoin(true, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValSerde, otherValueSerde, new KStreamImplJoin(true, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <V1, R> KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde) { return doJoin(other, joiner, windows, keySerde, thisValSerde, otherValueSerde, new KStreamImplJoin(true, false)); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullSelectorOnGroupBy() throws Exception { testStream.groupBy(null); }
@Override public <K1> KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector) { return groupBy(selector, null, null); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1> KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector) { return groupBy(selector, null, null); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1> KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector) { return groupBy(selector, null, null); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1> KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector) { return groupBy(selector, null, null); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public <K1> KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector) { return groupBy(selector, null, null); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }
@Test(expected = NullPointerException.class) public void shouldNotAllowNullActionOnForEach() throws Exception { testStream.foreach(null); }
@Override public void foreach(ForeachAction<? super K, ? super V> action) { Objects.requireNonNull(action, "action can't be null"); String name = topology.newName(FOREACH_NAME); topology.addProcessor(name, new KStreamPeek<>(action, false), this.name); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void foreach(ForeachAction<? super K, ? super V> action) { Objects.requireNonNull(action, "action can't be null"); String name = topology.newName(FOREACH_NAME); topology.addProcessor(name, new KStreamPeek<>(action, false), this.name); } }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void foreach(ForeachAction<? super K, ? super V> action) { Objects.requireNonNull(action, "action can't be null"); String name = topology.newName(FOREACH_NAME); topology.addProcessor(name, new KStreamPeek<>(action, false), this.name); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void foreach(ForeachAction<? super K, ? super V> action) { Objects.requireNonNull(action, "action can't be null"); String name = topology.newName(FOREACH_NAME); topology.addProcessor(name, new KStreamPeek<>(action, false), this.name); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); }
KStreamImpl extends AbstractStream<K> implements KStream<K, V> { @Override public void foreach(ForeachAction<? super K, ? super V> action) { Objects.requireNonNull(action, "action can't be null"); String name = topology.newName(FOREACH_NAME); topology.addProcessor(name, new KStreamPeek<>(action, false), this.name); } KStreamImpl(KStreamBuilder topology, String name, Set<String> sourceNodes, boolean repartitionRequired); @Override KStream<K, V> filter(Predicate<? super K, ? super V> predicate); @Override KStream<K, V> filterNot(final Predicate<? super K, ? super V> predicate); @Override KStream<K1, V> selectKey(final KeyValueMapper<? super K, ? super V, ? extends K1> mapper); @Override KStream<K1, V1> map(KeyValueMapper<? super K, ? super V, ? extends KeyValue<? extends K1, ? extends V1>> mapper); @Override KStream<K, V1> mapValues(ValueMapper<? super V, ? extends V1> mapper); @Override void print(); @Override void print(String streamName); @Override void print(Serde<K> keySerde, Serde<V> valSerde); @Override void print(Serde<K> keySerde, Serde<V> valSerde, String streamName); @Override void writeAsText(String filePath); @Override void writeAsText(String filePath, String streamName); @Override void writeAsText(String filePath, Serde<K> keySerde, Serde<V> valSerde); @Override void writeAsText(String filePath, String streamName, Serde<K> keySerde, Serde<V> valSerde); @Override KStream<K1, V1> flatMap(KeyValueMapper<? super K, ? super V, ? extends Iterable<? extends KeyValue<? extends K1, ? extends V1>>> mapper); @Override KStream<K, V1> flatMapValues(ValueMapper<? super V, ? extends Iterable<? extends V1>> mapper); @Override @SuppressWarnings("unchecked") KStream<K, V>[] branch(Predicate<? super K, ? super V>... predicates); static KStream<K, V> merge(KStreamBuilder topology, KStream<K, V>[] streams); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void foreach(ForeachAction<? super K, ? super V> action); @Override KStream<K, V> peek(final ForeachAction<? super K, ? super V> action); @Override KStream<K, V> through(Serde<K> keySerde, Serde<V> valSerde, String topic); @Override KStream<K, V> through(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override KStream<K, V> through(String topic); @Override void to(String topic); @Override void to(StreamPartitioner<? super K, ? super V> partitioner, String topic); @Override void to(Serde<K> keySerde, Serde<V> valSerde, String topic); @SuppressWarnings("unchecked") @Override void to(final Serde<K> keySerde, final Serde<V> valSerde, StreamPartitioner<? super K, ? super V> partitioner, final String topic); @Override KStream<K1, V1> transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>> transformerSupplier, String... stateStoreNames); @Override KStream<K, V1> transformValues(ValueTransformerSupplier<? super V, ? extends V1> valueTransformerSupplier, String... stateStoreNames); @Override void process(final ProcessorSupplier<? super K, ? super V> processorSupplier, String... stateStoreNames); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> join( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValueSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> outerJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows); @Override KStream<K, R> leftJoin( final KStream<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final JoinWindows windows, final Serde<K> keySerde, final Serde<V> thisValSerde, final Serde<V1> otherValueSerde); @Override KStream<K, R> leftJoin( KStream<K, V1> other, ValueJoiner<? super V, ? super V1, ? extends R> joiner, JoinWindows windows); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, R> join(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KStream<K, R> leftJoin(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); @Override KStream<K, V2> join(final GlobalKTable<K1, V1> globalTable, final KeyValueMapper<? super K, ? super V, ? extends K1> keyMapper, final ValueJoiner<? super V, ? super V1, ? extends V2> joiner); @Override KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner); KStream<K, R> leftJoin(final KTable<K, V1> other, final ValueJoiner<? super V, ? super V1, ? extends R> joiner, final Serde<K> keySerde, final Serde<V> valueSerde); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector); @Override KGroupedStream<K1, V> groupBy(KeyValueMapper<? super K, ? super V, K1> selector, Serde<K1> keySerde, Serde<V> valSerde); @Override KGroupedStream<K, V> groupByKey(); @Override KGroupedStream<K, V> groupByKey(Serde<K> keySerde, Serde<V> valSerde); static final String FILTER_NAME; static final String PEEK_NAME; static final String JOINTHIS_NAME; static final String JOINOTHER_NAME; static final String JOIN_NAME; static final String LEFTJOIN_NAME; static final String MERGE_NAME; static final String OUTERTHIS_NAME; static final String OUTEROTHER_NAME; static final String SINK_NAME; static final String SOURCE_NAME; static final String REPARTITION_TOPIC_SUFFIX; }