This is an automated email from the ASF dual-hosted git repository.
guozhang pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.1 by this push:
new 2f6ec8d MINOR: Update documentation for internal changelog when using table(). (#6021)
2f6ec8d is described below
commit 2f6ec8dac74a7a34a9e72e9ec48f2d9d751b638b
Author: cwildman <chriswildman@chriswildman.com>
AuthorDate: Fri Dec 14 05:33:25 2018 +0100
MINOR: Update documentation for internal changelog when using table(). (#6021)
Updating the documentation for table operation because I believe it is incorrect.
In PR #5163 the table operation stopped disabling the changelog topic by default and instead
moved that optimization to a configuration that is not enabled by default. This PR updates
the documentation to reflect the change in behavior and point to the new configuration for
optimization.
Reviewers: Bill Bejeck <bbejeck@gmail.com>, Guozhang Wang <wangguoz@gmail.com>
---
.../org/apache/kafka/streams/StreamsBuilder.java | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java b/streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java
index 4c9ee93..035c811 100644
--- a/streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java
+++ b/streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java
@@ -192,8 +192,9 @@ public class StreamsBuilder {
* <p>
* The resulting {@link KTable} will be materialized in a local {@link KeyValueStore}
using the given
* {@code Materialized} instance.
- * However, no internal changelog topic is created since the original input topic can
be used for recovery (cf.
- * methods of {@link KGroupedStream} and {@link KGroupedTable} that return a {@link KTable}).
+ * An internal changelog topic is created by default. Because the source topic can
+ * be used for recovery, you can avoid creating the changelog topic by setting
+ * the {@code "topology.optimization"} to {@code "all"} in the {@link StreamsConfig}.
* <p>
* You should only specify serdes in the {@link Consumed} instance as these will also
be used to overwrite the
* serdes in {@link Materialized}, i.e.,
@@ -241,8 +242,9 @@ public class StreamsBuilder {
* <p>
* The resulting {@link KTable} will be materialized in a local {@link KeyValueStore}
with an internal
* store name. Note that store name may not be queriable through Interactive Queries.
- * No internal changelog topic is created since the original input topic can be used
for recovery (cf.
- * methods of {@link KGroupedStream} and {@link KGroupedTable} that return a {@link KTable}).
+ * An internal changelog topic is created by default. Because the source topic can
+ * be used for recovery, you can avoid creating the changelog topic by setting
+ * the {@code "topology.optimization"} to {@code "all"} in the {@link StreamsConfig}.
*
* @param topic the topic name; cannot be {@code null}
* @return a {@link KTable} for the specified topic
@@ -262,8 +264,9 @@ public class StreamsBuilder {
* <p>
* The resulting {@link KTable} will be materialized in a local {@link KeyValueStore}
with an internal
* store name. Note that store name may not be queriable through Interactive Queries.
- * No internal changelog topic is created since the original input topic can be used
for recovery (cf.
- * methods of {@link KGroupedStream} and {@link KGroupedTable} that return a {@link KTable}).
+ * An internal changelog topic is created by default. Because the source topic can
+ * be used for recovery, you can avoid creating the changelog topic by setting
+ * the {@code "topology.optimization"} to {@code "all"} in the {@link StreamsConfig}.
*
* @param topic the topic name; cannot be {@code null}
* @param consumed the instance of {@link Consumed} used to define optional parameters;
cannot be {@code null}
@@ -290,8 +293,9 @@ public class StreamsBuilder {
* If this is not the case the returned {@link KTable} will be corrupted.
* <p>
* The resulting {@link KTable} will be materialized in a local {@link KeyValueStore}
using the {@link Materialized} instance.
- * No internal changelog topic is created since the original input topic can be used
for recovery (cf.
- * methods of {@link KGroupedStream} and {@link KGroupedTable} that return a {@link KTable}).
+ * An internal changelog topic is created by default. Because the source topic can
+ * be used for recovery, you can avoid creating the changelog topic by setting
+ * the {@code "topology.optimization"} to {@code "all"} in the {@link StreamsConfig}.
*
* @param topic the topic name; cannot be {@code null}
* @param materialized the instance of {@link Materialized} used to materialize a state
store; cannot be {@code null}
|