From 6a7d94ee032bae2d7f8c5f3d3471be3049b16b61 Mon Sep 17 00:00:00 2001 From: "Matthias J. Sax" Date: Fri, 27 Jan 2017 17:20:36 -0800 Subject: [PATCH] MINOR: JavaDoc markup cleanup --- .../apache/kafka/streams/KafkaStreams.java | 21 +- .../kafka/streams/kstream/Aggregator.java | 6 +- .../kafka/streams/kstream/ForeachAction.java | 2 +- .../kafka/streams/kstream/GlobalKTable.java | 18 +- .../kafka/streams/kstream/Initializer.java | 4 +- .../kafka/streams/kstream/JoinWindows.java | 10 +- .../kafka/streams/kstream/KGroupedStream.java | 4 +- .../kafka/streams/kstream/KGroupedTable.java | 4 +- .../apache/kafka/streams/kstream/KStream.java | 274 +++++++++--------- .../kafka/streams/kstream/KStreamBuilder.java | 2 +- .../apache/kafka/streams/kstream/KTable.java | 250 ++++++++-------- .../kafka/streams/kstream/KeyValueMapper.java | 4 +- .../kafka/streams/kstream/Predicate.java | 2 +- .../apache/kafka/streams/kstream/Reducer.java | 4 +- .../kafka/streams/kstream/SessionWindows.java | 6 +- .../kafka/streams/kstream/TimeWindows.java | 9 +- .../kafka/streams/kstream/Transformer.java | 4 +- .../streams/kstream/TransformerSupplier.java | 2 +- .../streams/kstream/UnlimitedWindows.java | 4 +- .../kafka/streams/kstream/ValueJoiner.java | 2 +- .../kafka/streams/kstream/ValueMapper.java | 4 +- .../streams/kstream/ValueTransformer.java | 6 +- .../kstream/ValueTransformerSupplier.java | 2 +- .../apache/kafka/streams/kstream/Window.java | 6 +- .../kafka/streams/kstream/Windowed.java | 2 +- 25 files changed, 324 insertions(+), 328 deletions(-) diff --git a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java index ef0e72dd3a8ef..c57804e532510 100644 --- a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java +++ b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java @@ -92,7 +92,7 @@ * If instances are added or fail, all (remaining) instances will rebalance the partition assignment among themselves * to balance processing load and ensure that all input topic partitions are processed. *

- * Internally a {@link KafkaStreams} instance contains a normal {@link KafkaProducer} and {@link KafkaConsumer} instance + * Internally a {@code KafkaStreams} instance contains a normal {@link KafkaProducer} and {@link KafkaConsumer} instance * that is used for reading input and writing output. *

* A simple example might look like this: @@ -187,7 +187,7 @@ public boolean isValidTransition(final State newState) { return validTransitions.contains(newState.ordinal()); } } - private volatile State state = KafkaStreams.State.CREATED; + private volatile State state = State.CREATED; private StateListener stateListener = null; @@ -412,9 +412,9 @@ private void checkBrokerVersionCompatibility() throws StreamsException { public synchronized void start() throws IllegalStateException, StreamsException { log.debug("Starting Kafka Stream process."); - if (state == KafkaStreams.State.CREATED) { + if (state == State.CREATED) { checkBrokerVersionCompatibility(); - setState(KafkaStreams.State.RUNNING); + setState(State.RUNNING); if (globalStreamThread != null) { globalStreamThread.start(); @@ -451,7 +451,7 @@ public void close() { public synchronized boolean close(final long timeout, final TimeUnit timeUnit) { log.debug("Stopping Kafka Stream process."); if (state.isCreatedOrRunning()) { - setState(KafkaStreams.State.PENDING_SHUTDOWN); + setState(State.PENDING_SHUTDOWN); // save the current thread so that if it is a stream thread // we don't attempt to join it and cause a deadlock final Thread shutdown = new Thread(new Runnable() { @@ -495,7 +495,7 @@ public void run() { } catch (final InterruptedException e) { Thread.interrupted(); } - setState(KafkaStreams.State.NOT_RUNNING); + setState(State.NOT_RUNNING); return !shutdown.isAlive(); } return true; @@ -539,11 +539,10 @@ public String toString(final String indent) { * Do a clean up of the local {@link StateStore} directory ({@link StreamsConfig#STATE_DIR_CONFIG}) by deleting all * data with regard to the {@link StreamsConfig#APPLICATION_ID_CONFIG application ID}. *

- * May only be called either before this {@code KafkaStreams} instance is {@link KafkaStreams#start() started} or - * after the instance is {@link KafkaStreams#close() closed}. + * May only be called either before this {@code KafkaStreams} instance is {@link #start() started} or after the + * instance is {@link #close() closed}. *

- * Calling this method triggers a restore of local {@link StateStore}s on the next {@link KafkaStreams#start() - * application start}. + * Calling this method triggers a restore of local {@link StateStore}s on the next {@link #start() application start}. * * @throws IllegalStateException if the instance is currently running */ @@ -629,7 +628,7 @@ public Collection allMetadataForStore(final String storeName) { * {@link ProducerConfig#PARTITIONER_CLASS_CONFIG configured} via {@link StreamsConfig}, * {@link KStream#through(StreamPartitioner, String)}, or {@link KTable#through(StreamPartitioner, String, String)}, * or if the original {@link KTable}'s input {@link KStreamBuilder#table(String, String) topic} is partitioned - * differently, please use {@link KafkaStreams#metadataForKey(String, Object, StreamPartitioner)}. + * differently, please use {@link #metadataForKey(String, Object, StreamPartitioner)}. *

* Note: *