mirror of https://github.com/apache/kafka.git
MINOR: Adding deprecated KTable methods to docs from KIP-114
Author: Bill Bejeck <bill@confluent.io> Reviewers: Guozhang Wang <wangguoz@gmail.com> Closes #3215 from bbejeck/kip114-doc
This commit is contained in:
parent
b62f156eb4
commit
1c70e7ac12
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue