mirror of https://github.com/apache/kafka.git
				
				
				
			MINOR: Modify checkstyle to allow import classes only used in javadoc
Author: Guozhang Wang <wangguoz@gmail.com> Reviewers: Gwen Shapira, Ismael Juma Closes #1317 from guozhangwang/KJavaDocImport
This commit is contained in:
		
							parent
							
								
									21e930b4b4
								
							
						
					
					
						commit
						9b6761ccd6
					
				|  | @ -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"/> | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue