You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2016/05/04 18:25:31 UTC
kafka git commit: MINOR: Modify checkstyle to allow import classes
only used in javadoc
Repository: kafka
Updated Branches:
refs/heads/trunk b410ea37b -> 768328689
MINOR: Modify checkstyle to allow import classes only used in javadoc
Author: Guozhang Wang <wa...@gmail.com>
Reviewers: Gwen Shapira, Ismael Juma
Closes #1317 from guozhangwang/KJavaDocImport
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/76832868
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/76832868
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/76832868
Branch: refs/heads/trunk
Commit: 768328689a59fa0984c099768136328e529e9fee
Parents: b410ea3
Author: Guozhang Wang <wa...@gmail.com>
Authored: Wed May 4 11:25:26 2016 -0700
Committer: Guozhang Wang <wa...@gmail.com>
Committed: Wed May 4 11:25:26 2016 -0700
----------------------------------------------------------------------
checkstyle/checkstyle.xml | 4 +++-
.../org/apache/kafka/streams/kstream/KTable.java | 18 +++++++++---------
.../streams/processor/StreamPartitioner.java | 4 +++-
3 files changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/76832868/checkstyle/checkstyle.xml
----------------------------------------------------------------------
diff --git a/checkstyle/checkstyle.xml b/checkstyle/checkstyle.xml
index 3adc446..25d6f2f 100644
--- a/checkstyle/checkstyle.xml
+++ b/checkstyle/checkstyle.xml
@@ -31,7 +31,9 @@
<module name="TreeWalker">
<!-- code cleanup -->
- <module name="UnusedImports"/>
+ <module name="UnusedImports">
+ <property name="processJavadoc" value="true" />
+ </module>
<module name="RedundantImport"/>
<module name="IllegalImport" />
<module name="EqualsHashCode"/>
http://git-wip-us.apache.org/repos/asf/kafka/blob/76832868/streams/src/main/java/org/apache/kafka/streams/kstream/KTable.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/KTable.java b/streams/src/main/java/org/apache/kafka/streams/kstream/KTable.java
index cc5a521..50d0595 100644
--- a/streams/src/main/java/org/apache/kafka/streams/kstream/KTable.java
+++ b/streams/src/main/java/org/apache/kafka/streams/kstream/KTable.java
@@ -21,6 +21,7 @@ import org.apache.kafka.common.annotation.InterfaceStability;
import org.apache.kafka.common.serialization.Serde;
import org.apache.kafka.streams.KeyValue;
import org.apache.kafka.streams.processor.StreamPartitioner;
+import org.apache.kafka.clients.producer.internals.DefaultPartitioner;
/**
* {@link KTable} is an abstraction of a <i>changelog stream</i> from a primary-keyed table.
@@ -114,7 +115,7 @@ public interface KTable<K, V> {
/**
* Materialize this stream to a topic, also creates a new instance of {@link KTable} from the topic
- * using default serializers and deserializers and producer's {@link org.apache.kafka.clients.producer.internals.DefaultPartitioner}.
+ * using default serializers and deserializers and producer's {@link DefaultPartitioner}.
* This is equivalent to calling {@link #to(String)} and {@link org.apache.kafka.streams.kstream.KStreamBuilder#table(String)}.
*
* @param topic the topic name
@@ -129,7 +130,7 @@ public interface KTable<K, V> {
* This is equivalent to calling {@link #to(String)} and {@link org.apache.kafka.streams.kstream.KStreamBuilder#table(String)}.
*
* @param partitioner the function used to determine how records are distributed among partitions of the topic,
- * if not specified producer's {@link org.apache.kafka.clients.producer.internals.DefaultPartitioner} will be used
+ * if not specified producer's {@link DefaultPartitioner} will be used
* @param topic the topic name
*
* @return a new {@link KTable} that contains the exact same records as this {@link KTable}
@@ -140,7 +141,7 @@ public interface KTable<K, V> {
* Materialize this stream to a topic, also creates a new instance of {@link KTable} from the topic.
* If {@code keySerde} provides a {@link org.apache.kafka.streams.kstream.internals.WindowedSerializer}
* for the key {@link org.apache.kafka.streams.kstream.internals.WindowedStreamPartitioner} is used
- * — otherwise producer's {@link org.apache.kafka.clients.producer.internals.DefaultPartitioner} is used.
+ * — otherwise producer's {@link DefaultPartitioner} is used.
* This is equivalent to calling {@link #to(Serde, Serde, String)} and
* {@link org.apache.kafka.streams.kstream.KStreamBuilder#table(Serde, Serde, String)}.
*
@@ -167,7 +168,7 @@ public interface KTable<K, V> {
* @param partitioner the function used to determine how records are distributed among partitions of the topic,
* if not specified and {@code keySerde} provides a {@link org.apache.kafka.streams.kstream.internals.WindowedSerializer} for the key
* {@link org.apache.kafka.streams.kstream.internals.WindowedStreamPartitioner} will be used
- * — otherwise {@link org.apache.kafka.clients.producer.internals.DefaultPartitioner} will be used
+ * — otherwise {@link DefaultPartitioner} will be used
* @param topic the topic name
*
* @return a new {@link KTable} that contains the exact same records as this {@link KTable}
@@ -176,7 +177,7 @@ public interface KTable<K, V> {
/**
* Materialize this stream to a topic using default serializers specified in the config
- * and producer's {@link org.apache.kafka.clients.producer.internals.DefaultPartitioner}.
+ * and producer's {@link DefaultPartitioner}.
*
* @param topic the topic name
*/
@@ -187,7 +188,7 @@ public interface KTable<K, V> {
* and a customizable {@link StreamPartitioner} to determine the distribution of records to partitions.
*
* @param partitioner the function used to determine how records are distributed among partitions of the topic,
- * if not specified producer's {@link org.apache.kafka.clients.producer.internals.DefaultPartitioner} will be used
+ * if not specified producer's {@link DefaultPartitioner} will be used
* @param topic the topic name
*/
void to(StreamPartitioner<K, V> partitioner, String topic);
@@ -196,7 +197,7 @@ public interface KTable<K, V> {
* Materialize this stream to a topic. If {@code keySerde} provides a
* {@link org.apache.kafka.streams.kstream.internals.WindowedSerializer} for the key
* {@link org.apache.kafka.streams.kstream.internals.WindowedStreamPartitioner} is used
- * — otherwise producer's {@link org.apache.kafka.clients.producer.internals.DefaultPartitioner} is used.
+ * — otherwise producer's {@link DefaultPartitioner} is used.
*
* @param keySerde key serde used to send key-value pairs,
* if not specified the default serde defined in the configs will be used
@@ -216,7 +217,7 @@ public interface KTable<K, V> {
* @param partitioner the function used to determine how records are distributed among partitions of the topic,
* if not specified and {@code keySerde} provides a {@link org.apache.kafka.streams.kstream.internals.WindowedSerializer} for the key
* {@link org.apache.kafka.streams.kstream.internals.WindowedStreamPartitioner} will be used
- * — otherwise {@link org.apache.kafka.clients.producer.internals.DefaultPartitioner} will be used
+ * — otherwise {@link DefaultPartitioner} will be used
* @param topic the topic name
*/
void to(Serde<K> keySerde, Serde<V> valSerde, StreamPartitioner<K, V> partitioner, String topic);
@@ -237,7 +238,6 @@ public interface KTable<K, V> {
* @param mapper @param mapper the instance of {@link KeyValueMapper}
* @param <K1> the new key type
*
- * @return a {@link KStream} that contains records with new keys of different type for each update of this {@link KTable}
* @return a {@link KStream} that contains the transformed records from this {@link KTable};
* the records are no longer treated as updates on a primary-keyed table,
* but rather as normal key-value pairs in a record stream
http://git-wip-us.apache.org/repos/asf/kafka/blob/76832868/streams/src/main/java/org/apache/kafka/streams/processor/StreamPartitioner.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/StreamPartitioner.java b/streams/src/main/java/org/apache/kafka/streams/processor/StreamPartitioner.java
index fbb0378..0c51c50 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/StreamPartitioner.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/StreamPartitioner.java
@@ -16,9 +16,11 @@
*/
package org.apache.kafka.streams.processor;
+import org.apache.kafka.clients.producer.internals.DefaultPartitioner;
+
/**
* Determine how records are distributed among the partitions in a Kafka topic. If not specified, the underlying producer's
- * {@link org.apache.kafka.clients.producer.internals.DefaultPartitioner} will be used to determine the partition.
+ * {@link DefaultPartitioner} will be used to determine the partition.
* <p>
* Kafka topics are divided into one or more <i>partitions</i>. Since each partition must fit on the servers that host it, so
* using multiple partitions allows the topic to scale beyond a size that will fit on a single machine. Partitions also enable you