Repository: kafka Updated Branches: refs/heads/0.11.0 bcbd5e665 -> bf2966a73
MINOR: Adding deprecated KTable methods to docs from KIP-114 Author: Bill Bejeck <[email protected]> Reviewers: Guozhang Wang <[email protected]> Closes #3215 from bbejeck/kip114-doc (cherry picked from commit 1c70e7ac12966bb13fecd633b5ba8223178733a4) Signed-off-by: Guozhang Wang <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/kafka/repo Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/bf2966a7 Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/bf2966a7 Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/bf2966a7 Branch: refs/heads/0.11.0 Commit: bf2966a73aa7e40d7724a28c8cf8f30765cf8bcc Parents: bcbd5e6 Author: Bill Bejeck <[email protected]> Authored: Mon Jun 5 11:08:00 2017 -0700 Committer: Guozhang Wang <[email protected]> Committed: Mon Jun 5 11:25:10 2017 -0700 ---------------------------------------------------------------------- docs/streams.html | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kafka/blob/bf2966a7/docs/streams.html ---------------------------------------------------------------------- diff --git a/docs/streams.html b/docs/streams.html index 4e07cfa..d151632 100644 --- a/docs/streams.html +++ b/docs/streams.html @@ -829,12 +829,12 @@ $ java -cp path-to-app-fatjar.jar com.example.MyStreamsApp <p> Updates in <code>StreamsConfig</code>: </p> <ul> - <li> configuration parameter <code>key.serde</code> was deprecated and replaced by <code>default.key.serde</code> - <li> configuration parameter <code>value.serde</code> was deprecated and replaced by <code>default.value.serde</code> - <li> configuration parameter <code>timestamp.extractor</code> was deprecated and replaced by <code>default.timestamp.extractor</code> - <li> method <code>#keySerde()</code> was deprecated and replaced by <code>#defaultKeySerde()</code> - <li> method <code>#valueSerde()</code> was deprecated and replaced by <code>#defaultValueSerde()</code> - <li> new method <code>#defaultTimestampExtractor()</code> was added </code> + <li> configuration parameter <code>key.serde</code> was deprecated and replaced by <code>default.key.serde</code> </li> + <li> configuration parameter <code>value.serde</code> was deprecated and replaced by <code>default.value.serde</code> </li> + <li> configuration parameter <code>timestamp.extractor</code> was deprecated and replaced by <code>default.timestamp.extractor</code> </li> + <li> method <code>#keySerde()</code> was deprecated and replaced by <code>#defaultKeySerde()</code> </li> + <li> method <code>#valueSerde()</code> was deprecated and replaced by <code>#defaultValueSerde()</code> </li> + <li> new method <code>#defaultTimestampExtractor()</code> was added </li> </ul> <p> New methods in <code>TopologyBuilder</code>: </p> @@ -850,13 +850,38 @@ $ java -cp path-to-app-fatjar.jar com.example.MyStreamsApp <li> added overloads for <code>#globalKTable()</code> that allow to define a <code>TimestampExtractor</code> per global table </li> </ul> - <h3><a id="streams_api_changes_01021" href="#streams_api_changes_01021">Stream API changes in 0.10.2.1</a></h3> + <p> Deprecated methods in <code>KTable</code>: </p> + <ul> + <li> <code>void foreach(final ForeachAction<? super K, ? super V> action)</code> </li> + <li> <code>void print()</code> </li> + <li> <code>void print(final String streamName)</code> </li> + <li> <code>void print(final Serde<K> keySerde, final Serde<V> valSerde)</code> </li> + <li> <code>void print(final Serde<K> keySerde, final Serde<V> valSerde, final String streamName)</code> </li> + <li> <code>void writeAsText(final String filePath)</code> </li> + <li> <code>void writeAsText(final String filePath, final String streamName)</code> </li> + <li> <code>void writeAsText(final String filePath, final Serde<K> keySerde, final Serde<V> valSerde)</code> </li> + <li> <code>void writeAsText(final String filePath, final String streamName, final Serde<K> keySerde, final Serde<V> valSerde)</code> </li> + </ul> + + <p> + The above methods have been deprecated in favor of using the Interactive Queries API. + If you want to query the current content of the state store backing the KTable, use the following approach: + </p> + <ul> + <li> Make a call to <code>KafkaStreams.store(final String storeName, final QueryableStoreType<T> queryableStoreType)</code> </li> + <li> Then make a call to <code>ReadOnlyKeyValueStore.all()</code> to iterate over the keys of a <code>KTable</code>. </li> + </ul> + <p> + If you want to view the changelog stream of the <code>KTable</code> then you could call <code>KTable.toStream().print()</code>. + </p> + + <h3><a id="streams_api_changes_01021" href="#streams_api_changes_01021">Notable changes in 0.10.2.1</a></h3> <p> Parameter updates in <code>StreamsConfig</code>: </p> <ul> - <li> of particular importance to improve the resiliency of a Kafka Streams application are two changes to default parameters of producer <code>retries</code> and consumer <code>max.poll.interval.ms</code> </li> + <li> The default config values of embedded producer's <code>retries</code> and consumer's <code>max.poll.interval.ms</code> have been changed to improve the resiliency of a Kafka Streams application </li> </ul> <h3><a id="streams_api_changes_0102" href="#streams_api_changes_0102">Streams API changes in 0.10.2.0</a></h3>
