http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamRecordWriter.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamRecordWriter.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamRecordWriter.java index 1c11a28..6775bc4 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamRecordWriter.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamRecordWriter.java @@ -17,15 +17,16 @@ package org.apache.flink.streaming.runtime.io; -import static org.apache.flink.util.Preconditions.checkArgument; - -import java.io.IOException; import org.apache.flink.annotation.Internal; import org.apache.flink.core.io.IOReadableWritable; import org.apache.flink.runtime.io.network.api.writer.ChannelSelector; import org.apache.flink.runtime.io.network.api.writer.RecordWriter; import org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter; +import java.io.IOException; + +import static org.apache.flink.util.Preconditions.checkArgument; + /** * This record writer keeps data in buffers at most for a certain timeout. It spawns a separate thread * that flushes the outputs in a defined interval, to make sure data does not linger in the buffers for too long. @@ -48,8 +49,6 @@ public class StreamRecordWriter<T extends IOReadableWritable> extends RecordWrit /** The exception encountered in the flushing thread. */ private Throwable flusherException; - - public StreamRecordWriter(ResultPartitionWriter writer, ChannelSelector<T> channelSelector, long timeout) { this(writer, channelSelector, timeout, null); } @@ -152,7 +151,6 @@ public class StreamRecordWriter<T extends IOReadableWritable> extends RecordWrit private volatile boolean running = true; - OutputFlusher(String name, long timeout) { super(name); setDaemon(true);
http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTwoInputProcessor.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTwoInputProcessor.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTwoInputProcessor.java index 367b773..a25540d 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTwoInputProcessor.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTwoInputProcessor.java @@ -18,10 +18,6 @@ package org.apache.flink.streaming.runtime.io; -import static org.apache.flink.util.Preconditions.checkNotNull; - -import java.io.IOException; -import java.util.Collection; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.configuration.Configuration; @@ -53,6 +49,11 @@ import org.apache.flink.streaming.runtime.streamstatus.StatusWatermarkValve; import org.apache.flink.streaming.runtime.streamstatus.StreamStatus; import org.apache.flink.streaming.runtime.streamstatus.StreamStatusMaintainer; +import java.io.IOException; +import java.util.Collection; + +import static org.apache.flink.util.Preconditions.checkNotNull; + /** * Input reader for {@link org.apache.flink.streaming.runtime.tasks.TwoInputStreamTask}. * http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/CheckpointCommitter.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/CheckpointCommitter.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/CheckpointCommitter.java index 455de3e..58139ba 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/CheckpointCommitter.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/CheckpointCommitter.java @@ -15,12 +15,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators; -import java.io.Serializable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.Serializable; + /** * This class is used to save information about which sink operator instance has committed checkpoints to a backend. * <p/> http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/GenericWriteAheadSink.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/GenericWriteAheadSink.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/GenericWriteAheadSink.java index 35f420a..aed60e5 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/GenericWriteAheadSink.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/GenericWriteAheadSink.java @@ -15,14 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators; -import java.io.IOException; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; -import java.util.TreeSet; -import java.util.UUID; import org.apache.flink.api.common.state.ListState; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.core.fs.FSDataInputStream; @@ -38,9 +33,17 @@ import org.apache.flink.streaming.api.operators.AbstractStreamOperator; import org.apache.flink.streaming.api.operators.OneInputStreamOperator; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; import org.apache.flink.util.Preconditions; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.IOException; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; +import java.util.UUID; + /** * Generic Sink that emits its input elements into an arbitrary backend. This sink is integrated with Flink's checkpointing * mechanism and can provide exactly-once guarantees; depending on the storage backend and sink/committer implementation. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPeriodicWatermarksOperator.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPeriodicWatermarksOperator.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPeriodicWatermarksOperator.java index 8fe65cf..57e8321 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPeriodicWatermarksOperator.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPeriodicWatermarksOperator.java @@ -41,7 +41,6 @@ public class TimestampsAndPeriodicWatermarksOperator<T> private transient long currentWatermark; - public TimestampsAndPeriodicWatermarksOperator(AssignerWithPeriodicWatermarks<T> assigner) { super(assigner); this.chainingStrategy = ChainingStrategy.ALWAYS; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPunctuatedWatermarksOperator.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPunctuatedWatermarksOperator.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPunctuatedWatermarksOperator.java index 45a55de..0d39473 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPunctuatedWatermarksOperator.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPunctuatedWatermarksOperator.java @@ -38,7 +38,6 @@ public class TimestampsAndPunctuatedWatermarksOperator<T> private long currentWatermark = Long.MIN_VALUE; - public TimestampsAndPunctuatedWatermarksOperator(AssignerWithPunctuatedWatermarks<T> assigner) { super(assigner); this.chainingStrategy = ChainingStrategy.ALWAYS; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/package-info.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/package-info.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/package-info.java index ee5d7f1..3a6e33f 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/package-info.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/package-info.java @@ -19,4 +19,5 @@ * This package contains the operators that perform the stream transformations. * One or more operators are bundled into a "chain" and executed in a stream task. */ + package org.apache.flink.streaming.runtime.operators; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AbstractAlignedProcessingTimeWindowOperator.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AbstractAlignedProcessingTimeWindowOperator.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AbstractAlignedProcessingTimeWindowOperator.java index 21e9e69..83a7528 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AbstractAlignedProcessingTimeWindowOperator.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AbstractAlignedProcessingTimeWindowOperator.java @@ -18,9 +18,6 @@ package org.apache.flink.streaming.runtime.operators.windowing; -import static java.util.Objects.requireNonNull; - -import org.apache.commons.math3.util.ArithmeticUtils; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.functions.Function; import org.apache.flink.api.common.typeutils.TypeSerializer; @@ -37,6 +34,10 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; import org.apache.flink.streaming.runtime.tasks.ProcessingTimeCallback; import org.apache.flink.util.MathUtils; +import org.apache.commons.math3.util.ArithmeticUtils; + +import static java.util.Objects.requireNonNull; + /** * Base class for special window operator implementation for windows that fire at the same time for * all keys. @@ -114,7 +115,6 @@ public abstract class AbstractAlignedProcessingTimeWindowOperator<KEY, IN, OUT, this.numPanesPerWindow = MathUtils.checkedDownCast(windowLength / paneSlide); } - protected abstract AbstractKeyedTimePanes<IN, KEY, STATE, OUT> createPanes( KeySelector<IN, KEY> keySelector, Function function); http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AbstractKeyedTimePanes.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AbstractKeyedTimePanes.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AbstractKeyedTimePanes.java index b6affa6..f815107 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AbstractKeyedTimePanes.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AbstractKeyedTimePanes.java @@ -18,9 +18,6 @@ package org.apache.flink.streaming.runtime.operators.windowing; -import java.io.IOException; -import java.util.ArrayDeque; -import java.util.Iterator; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.core.memory.DataInputView; @@ -29,6 +26,10 @@ import org.apache.flink.streaming.api.operators.AbstractStreamOperator; import org.apache.flink.streaming.api.windowing.windows.TimeWindow; import org.apache.flink.util.Collector; +import java.io.IOException; +import java.util.ArrayDeque; +import java.util.Iterator; + /** * Base class for a multiple key/value maps organized in panes. */ @@ -51,7 +52,6 @@ public abstract class AbstractKeyedTimePanes<Type, Key, Aggregate, Result> { public abstract void evaluateWindow(Collector<Result> out, TimeWindow window, AbstractStreamOperator<Result> operator) throws Exception; - public void dispose() { // since all is heap data, there is no need to clean up anything latestPane = null; @@ -62,7 +62,6 @@ public abstract class AbstractKeyedTimePanes<Type, Key, Aggregate, Result> { return previousPanes.size() + 1; } - public void slidePanes(int panesToKeep) { if (panesToKeep > 1) { // the current pane becomes the latest previous pane http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AccumulatingKeyedTimePanes.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AccumulatingKeyedTimePanes.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AccumulatingKeyedTimePanes.java index 4511b6b..6892aaa 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AccumulatingKeyedTimePanes.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AccumulatingKeyedTimePanes.java @@ -18,7 +18,6 @@ package org.apache.flink.streaming.runtime.operators.windowing; -import java.util.ArrayList; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.state.FoldingState; import org.apache.flink.api.common.state.FoldingStateDescriptor; @@ -39,6 +38,8 @@ import org.apache.flink.streaming.runtime.operators.windowing.functions.Internal import org.apache.flink.util.Collector; import org.apache.flink.util.UnionIterator; +import java.util.ArrayList; + /** * Key/value map organized in panes for accumulating windows (with a window function). */ @@ -129,7 +130,6 @@ public class AccumulatingKeyedTimePanes<Type, Key, Result> extends AbstractKeyed this.context = context; } - @Override public void startNewKey(Key key) { unionIterator.clear(); http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AccumulatingProcessingTimeWindowOperator.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AccumulatingProcessingTimeWindowOperator.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AccumulatingProcessingTimeWindowOperator.java index 19474ec..d67121a 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AccumulatingProcessingTimeWindowOperator.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AccumulatingProcessingTimeWindowOperator.java @@ -18,7 +18,6 @@ package org.apache.flink.streaming.runtime.operators.windowing; -import java.util.ArrayList; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.functions.Function; import org.apache.flink.api.common.typeutils.TypeSerializer; @@ -28,6 +27,8 @@ import org.apache.flink.streaming.api.windowing.windows.TimeWindow; import org.apache.flink.streaming.api.windowing.windows.Window; import org.apache.flink.streaming.runtime.operators.windowing.functions.InternalWindowFunction; +import java.util.ArrayList; + /** * Special window operator implementation for windows that fire at the same time for all keys with * accumulating windows. @@ -42,7 +43,6 @@ public class AccumulatingProcessingTimeWindowOperator<KEY, IN, OUT> private static final long serialVersionUID = 7305948082830843475L; - public AccumulatingProcessingTimeWindowOperator( InternalWindowFunction<Iterable<IN>, OUT, KEY, TimeWindow> function, KeySelector<IN, KEY> keySelector, http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AggregatingProcessingTimeWindowOperator.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AggregatingProcessingTimeWindowOperator.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AggregatingProcessingTimeWindowOperator.java index 724f306..6747383 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AggregatingProcessingTimeWindowOperator.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AggregatingProcessingTimeWindowOperator.java @@ -38,7 +38,6 @@ public class AggregatingProcessingTimeWindowOperator<KEY, IN> private static final long serialVersionUID = 7305948082830843475L; - public AggregatingProcessingTimeWindowOperator( ReduceFunction<IN> function, KeySelector<IN, KEY> keySelector, http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java index f9654e5..d78de09 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java @@ -15,14 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.flink.streaming.runtime.operators.windowing; -import static org.apache.flink.util.Preconditions.checkNotNull; +package org.apache.flink.streaming.runtime.operators.windowing; -import com.google.common.base.Function; -import com.google.common.collect.FluentIterable; -import com.google.common.collect.Iterables; -import java.util.Collection; import org.apache.flink.annotation.Internal; import org.apache.flink.annotation.VisibleForTesting; import org.apache.flink.api.common.state.AppendingState; @@ -43,6 +38,14 @@ import org.apache.flink.streaming.runtime.operators.windowing.functions.Internal import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; import org.apache.flink.util.OutputTag; +import com.google.common.base.Function; +import com.google.common.collect.FluentIterable; +import com.google.common.collect.Iterables; + +import java.util.Collection; + +import static org.apache.flink.util.Preconditions.checkNotNull; + /** * A {@link WindowOperator} that also allows an {@link Evictor} to be used. * @@ -350,7 +353,6 @@ public class EvictingWindowOperator<K, IN, OUT, W extends Window> userFunction.process(triggerContext.key, triggerContext.window, processContext, projectedContents, timestampedCollector); evictorContext.evictAfter(recordsWithTimestamp, Iterables.size(recordsWithTimestamp)); - //work around to fix FLINK-4369, remove the evicted elements from the windowState. //this is inefficient, but there is no other way to remove elements from ListState, which is an AppendingState. windowState.clear(); @@ -404,7 +406,6 @@ public class EvictingWindowOperator<K, IN, OUT, W extends Window> return EvictingWindowOperator.this.getMetricGroup(); } - public K getKey() { return key; } http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java index 2fd1825..0595229 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java @@ -18,13 +18,14 @@ package org.apache.flink.streaming.runtime.operators.windowing; +import org.apache.flink.annotation.Internal; +import org.apache.flink.api.common.functions.ReduceFunction; +import org.apache.flink.util.MathUtils; + import java.util.Arrays; import java.util.Comparator; import java.util.Iterator; import java.util.NoSuchElementException; -import org.apache.flink.annotation.Internal; -import org.apache.flink.api.common.functions.ReduceFunction; -import org.apache.flink.util.MathUtils; /** * A special Hash Map implementation that can be traversed efficiently in sync with other @@ -583,7 +584,6 @@ public class KeyMap<K, V> implements Iterable<KeyMap.Entry<K, V>> { private CapacityDescendingComparator() {} - @Override public int compare(KeyMap<?, ?> o1, KeyMap<?, ?> o2) { // this sorts descending http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/MergingWindowSet.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/MergingWindowSet.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/MergingWindowSet.java index 5409571..10ac2a6 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/MergingWindowSet.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/MergingWindowSet.java @@ -15,20 +15,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; import org.apache.flink.api.common.state.ListState; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.streaming.api.windowing.assigners.MergingWindowAssigner; import org.apache.flink.streaming.api.windowing.windows.Window; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + /** * Utility for keeping track of merging {@link Window Windows} when using a * {@link MergingWindowAssigner} in a {@link WindowOperator}. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/TimestampedValue.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/TimestampedValue.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/TimestampedValue.java index 108162b..4135cb0 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/TimestampedValue.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/TimestampedValue.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing; import org.apache.flink.annotation.PublicEvolving; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java index a62c9ff..880907d 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java @@ -18,16 +18,6 @@ package org.apache.flink.streaming.runtime.operators.windowing; -import static org.apache.flink.util.Preconditions.checkArgument; -import static org.apache.flink.util.Preconditions.checkNotNull; - -import java.io.IOException; -import java.io.Serializable; -import java.util.Collection; -import java.util.Comparator; -import java.util.List; -import java.util.PriorityQueue; -import org.apache.commons.math3.util.ArithmeticUtils; import org.apache.flink.annotation.Internal; import org.apache.flink.annotation.VisibleForTesting; import org.apache.flink.api.common.state.AppendingState; @@ -82,6 +72,18 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; import org.apache.flink.util.OutputTag; import org.apache.flink.util.Preconditions; +import org.apache.commons.math3.util.ArithmeticUtils; + +import java.io.IOException; +import java.io.Serializable; +import java.util.Collection; +import java.util.Comparator; +import java.util.List; +import java.util.PriorityQueue; + +import static org.apache.flink.util.Preconditions.checkArgument; +import static org.apache.flink.util.Preconditions.checkNotNull; + /** * An operator that implements the logic for windowing based on a {@link WindowAssigner} and * {@link Trigger}. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalAggregateProcessAllWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalAggregateProcessAllWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalAggregateProcessAllWindowFunction.java index 2490d60..3d58156 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalAggregateProcessAllWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalAggregateProcessAllWindowFunction.java @@ -15,9 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; -import java.util.Collections; import org.apache.flink.api.common.functions.AggregateFunction; import org.apache.flink.api.common.functions.IterationRuntimeContext; import org.apache.flink.api.common.functions.RuntimeContext; @@ -27,6 +27,8 @@ import org.apache.flink.streaming.api.functions.windowing.ProcessAllWindowFuncti import org.apache.flink.streaming.api.windowing.windows.Window; import org.apache.flink.util.Collector; +import java.util.Collections; + /** * Internal window function for wrapping a {@link ProcessAllWindowFunction} that takes an * {@code Iterable} and an {@link AggregateFunction}. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalAggregateProcessWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalAggregateProcessWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalAggregateProcessWindowFunction.java index c69ec53..e2dfe3f 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalAggregateProcessWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalAggregateProcessWindowFunction.java @@ -15,9 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; -import java.util.Collections; import org.apache.flink.api.common.functions.AggregateFunction; import org.apache.flink.api.common.functions.IterationRuntimeContext; import org.apache.flink.api.common.functions.RuntimeContext; @@ -26,6 +26,8 @@ import org.apache.flink.streaming.api.functions.windowing.ProcessWindowFunction; import org.apache.flink.streaming.api.windowing.windows.Window; import org.apache.flink.util.Collector; +import java.util.Collections; + /** * Internal window function for wrapping a {@link ProcessWindowFunction} that takes an * {@code Iterable} and an {@link AggregateFunction}. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableAllWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableAllWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableAllWindowFunction.java index f2507ed..5d92112 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableAllWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableAllWindowFunction.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; import org.apache.flink.api.common.functions.IterationRuntimeContext; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableProcessAllWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableProcessAllWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableProcessAllWindowFunction.java index 47b7d55..6d4ce5c 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableProcessAllWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableProcessAllWindowFunction.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; import org.apache.flink.api.common.functions.IterationRuntimeContext; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableProcessWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableProcessWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableProcessWindowFunction.java index 7eb015e..cb64d85 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableProcessWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableProcessWindowFunction.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; import org.apache.flink.api.common.functions.IterationRuntimeContext; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableWindowFunction.java index e2f1517..1506b77 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalIterableWindowFunction.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; import org.apache.flink.api.common.functions.IterationRuntimeContext; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalProcessAllWindowContext.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalProcessAllWindowContext.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalProcessAllWindowContext.java index c70e161..66ec656 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalProcessAllWindowContext.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalProcessAllWindowContext.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; import org.apache.flink.annotation.Internal; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalProcessWindowContext.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalProcessWindowContext.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalProcessWindowContext.java index d575f01..9505332 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalProcessWindowContext.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalProcessWindowContext.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; import org.apache.flink.annotation.Internal; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueAllWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueAllWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueAllWindowFunction.java index 03ad0bd..9acef74 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueAllWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueAllWindowFunction.java @@ -15,9 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; -import java.util.Collections; import org.apache.flink.api.common.functions.IterationRuntimeContext; import org.apache.flink.api.common.functions.RuntimeContext; import org.apache.flink.api.java.operators.translation.WrappingFunction; @@ -25,6 +25,8 @@ import org.apache.flink.streaming.api.functions.windowing.AllWindowFunction; import org.apache.flink.streaming.api.windowing.windows.Window; import org.apache.flink.util.Collector; +import java.util.Collections; + /** * Internal window function for wrapping an {@link AllWindowFunction} that takes an {@code Iterable} * when the window state is a single value. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueProcessAllWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueProcessAllWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueProcessAllWindowFunction.java index eeef8eb..ddadbdf 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueProcessAllWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueProcessAllWindowFunction.java @@ -15,9 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; -import java.util.Collections; import org.apache.flink.api.common.functions.IterationRuntimeContext; import org.apache.flink.api.common.functions.RuntimeContext; import org.apache.flink.api.java.operators.translation.WrappingFunction; @@ -26,6 +26,8 @@ import org.apache.flink.streaming.api.functions.windowing.ProcessAllWindowFuncti import org.apache.flink.streaming.api.windowing.windows.Window; import org.apache.flink.util.Collector; +import java.util.Collections; + /** * Internal window function for wrapping a {@link ProcessAllWindowFunction} that takes an {@code Iterable} * when the window state is a single value. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueProcessWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueProcessWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueProcessWindowFunction.java index 490069c..52b95b1 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueProcessWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueProcessWindowFunction.java @@ -15,9 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; -import java.util.Collections; import org.apache.flink.api.common.functions.IterationRuntimeContext; import org.apache.flink.api.common.functions.RuntimeContext; import org.apache.flink.api.java.operators.translation.WrappingFunction; @@ -25,6 +25,8 @@ import org.apache.flink.streaming.api.functions.windowing.ProcessWindowFunction; import org.apache.flink.streaming.api.windowing.windows.Window; import org.apache.flink.util.Collector; +import java.util.Collections; + /** * Internal window function for wrapping a {@link ProcessWindowFunction} that takes an {@code Iterable} * when the window state is a single value. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueWindowFunction.java index a629c76..9b0eccf 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalSingleValueWindowFunction.java @@ -15,9 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; -import java.util.Collections; import org.apache.flink.api.common.functions.IterationRuntimeContext; import org.apache.flink.api.common.functions.RuntimeContext; import org.apache.flink.api.java.operators.translation.WrappingFunction; @@ -25,6 +25,8 @@ import org.apache.flink.streaming.api.functions.windowing.WindowFunction; import org.apache.flink.streaming.api.windowing.windows.Window; import org.apache.flink.util.Collector; +import java.util.Collections; + /** * Internal window function for wrapping a {@link WindowFunction} that takes an {@code Iterable} * when the window state is a single value. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalWindowFunction.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalWindowFunction.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalWindowFunction.java index ea64dda..0999565 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalWindowFunction.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/functions/InternalWindowFunction.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.operators.windowing.functions; import org.apache.flink.api.common.functions.Function; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/package-info.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/package-info.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/package-info.java index 229812c..0944b16 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/package-info.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/package-info.java @@ -19,4 +19,5 @@ * This package contains the operators that implement the various window operations * on data streams. */ + package org.apache.flink.streaming.runtime.operators.windowing; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/ShufflePartitioner.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/ShufflePartitioner.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/ShufflePartitioner.java index 87243fc..60c3fbc 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/ShufflePartitioner.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/ShufflePartitioner.java @@ -17,12 +17,12 @@ package org.apache.flink.streaming.runtime.partitioner; -import java.util.Random; - import org.apache.flink.annotation.Internal; import org.apache.flink.runtime.plugable.SerializationDelegate; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; +import java.util.Random; + /** * Partitioner that distributes the data equally by selecting one output channel * randomly. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/StreamPartitioner.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/StreamPartitioner.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/StreamPartitioner.java index 415a3c7..411aa8b 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/StreamPartitioner.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/StreamPartitioner.java @@ -14,15 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.flink.streaming.runtime.partitioner; -import java.io.Serializable; +package org.apache.flink.streaming.runtime.partitioner; import org.apache.flink.annotation.Internal; import org.apache.flink.runtime.io.network.api.writer.ChannelSelector; import org.apache.flink.runtime.plugable.SerializationDelegate; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; +import java.io.Serializable; + /** * A special {@link ChannelSelector} for use in streaming programs. */ http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/LatencyMarker.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/LatencyMarker.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/LatencyMarker.java index 131658d..84af297 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/LatencyMarker.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/LatencyMarker.java @@ -65,7 +65,6 @@ public final class LatencyMarker extends StreamElement { // ------------------------------------------------------------------------ - @Override public boolean equals(Object o) { if (this == o) { http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamElementSerializer.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamElementSerializer.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamElementSerializer.java index 390ac9d..b3ecded 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamElementSerializer.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamElementSerializer.java @@ -18,9 +18,6 @@ package org.apache.flink.streaming.runtime.streamrecord; -import static java.util.Objects.requireNonNull; - -import java.io.IOException; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.CompatibilityResult; import org.apache.flink.api.common.typeutils.CompatibilityUtil; @@ -35,6 +32,10 @@ import org.apache.flink.core.memory.DataOutputView; import org.apache.flink.streaming.api.watermark.Watermark; import org.apache.flink.streaming.runtime.streamstatus.StreamStatus; +import java.io.IOException; + +import static java.util.Objects.requireNonNull; + /** * Serializer for {@link StreamRecord}, {@link Watermark}, {@link LatencyMarker}, and * {@link StreamStatus}. @@ -58,7 +59,6 @@ public final class StreamElementSerializer<T> extends TypeSerializer<StreamEleme private final TypeSerializer<T> typeSerializer; - public StreamElementSerializer(TypeSerializer<T> serializer) { if (serializer instanceof StreamElementSerializer) { throw new RuntimeException("StreamRecordSerializer given to StreamRecordSerializer as value TypeSerializer: " + serializer); http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StatusWatermarkValve.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StatusWatermarkValve.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StatusWatermarkValve.java index 487fd8a..1444a9d 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StatusWatermarkValve.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StatusWatermarkValve.java @@ -18,12 +18,12 @@ package org.apache.flink.streaming.runtime.streamstatus; -import static org.apache.flink.util.Preconditions.checkArgument; -import static org.apache.flink.util.Preconditions.checkNotNull; - import org.apache.flink.annotation.Internal; import org.apache.flink.streaming.api.watermark.Watermark; +import static org.apache.flink.util.Preconditions.checkArgument; +import static org.apache.flink.util.Preconditions.checkNotNull; + /** * A {@code StatusWatermarkValve} embodies the logic of how {@link Watermark} and {@link StreamStatus} are propagated to * downstream outputs, given a set of one or multiple input channels that continuously receive them. Usages of this @@ -40,6 +40,7 @@ public class StatusWatermarkValve { */ public interface ValveOutputHandler { void handleWatermark(Watermark watermark); + void handleStreamStatus(StreamStatus streamStatus); } http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StreamStatusMaintainer.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StreamStatusMaintainer.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StreamStatusMaintainer.java index d964cef..6854afd 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StreamStatusMaintainer.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StreamStatusMaintainer.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.streamstatus; import org.apache.flink.annotation.Internal; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StreamStatusProvider.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StreamStatusProvider.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StreamStatusProvider.java index ae8d9af..afc572d 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StreamStatusProvider.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamstatus/StreamStatusProvider.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.streamstatus; import org.apache.flink.annotation.Internal; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/ExceptionInChainedOperatorException.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/ExceptionInChainedOperatorException.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/ExceptionInChainedOperatorException.java index d4027bf..4f5f6d2 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/ExceptionInChainedOperatorException.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/ExceptionInChainedOperatorException.java @@ -18,11 +18,11 @@ package org.apache.flink.streaming.runtime.tasks; -import static java.util.Objects.requireNonNull; - import org.apache.flink.annotation.Internal; import org.apache.flink.util.WrappingRuntimeException; +import static java.util.Objects.requireNonNull; + /** * A special exception that signifies that the cause exception came from a chained operator. */ http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java index 870c2ed..0f29b73 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java @@ -17,13 +17,6 @@ package org.apache.flink.streaming.runtime.tasks; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.api.java.tuple.Tuple2; @@ -59,6 +52,13 @@ import org.apache.flink.util.XORShiftRandom; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + /** * The {@code OperatorChain} contains all operators that are executed as one chain within a single * {@link StreamTask}. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorStateHandles.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorStateHandles.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorStateHandles.java index 988ae7f..1a79f54 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorStateHandles.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorStateHandles.java @@ -18,8 +18,6 @@ package org.apache.flink.streaming.runtime.tasks; -import java.util.Collection; -import java.util.List; import org.apache.flink.annotation.Internal; import org.apache.flink.annotation.VisibleForTesting; import org.apache.flink.runtime.state.ChainedStateHandle; @@ -30,6 +28,9 @@ import org.apache.flink.runtime.state.TaskStateHandles; import org.apache.flink.util.CollectionUtil; import org.apache.flink.util.Preconditions; +import java.util.Collection; +import java.util.List; + /** * This class holds all state handles for one operator. */ http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java index 31cd7c1..a36e015 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java @@ -89,7 +89,6 @@ public class SourceStreamTask<OUT, SRC extends SourceFunction<OUT>, OP extends S // does not hold any resources, so no cleanup needed } - @Override protected void run() throws Exception { headOperator.run(getCheckpointLock(), getStreamStatusMaintainer()); http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StoppableSourceStreamTask.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StoppableSourceStreamTask.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StoppableSourceStreamTask.java index 7ff39b7..d2a3f4d 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StoppableSourceStreamTask.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StoppableSourceStreamTask.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.tasks; import org.apache.flink.api.common.functions.StoppableFunction; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamIterationHead.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamIterationHead.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamIterationHead.java index 859e32e..b800206 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamIterationHead.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamIterationHead.java @@ -17,18 +17,20 @@ package org.apache.flink.streaming.runtime.tasks; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.JobID; import org.apache.flink.streaming.api.watermark.Watermark; import org.apache.flink.streaming.runtime.io.BlockingQueueBroker; import org.apache.flink.streaming.runtime.io.RecordWriterOutput; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.TimeUnit; + /** * A special {@link StreamTask} that is used for executing feedback edges. This is used in * combination with {@link StreamIterationTail}. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamIterationTail.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamIterationTail.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamIterationTail.java index df5edb1..d2ec08f 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamIterationTail.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamIterationTail.java @@ -17,9 +17,6 @@ package org.apache.flink.streaming.runtime.tasks; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; - import org.apache.flink.annotation.Internal; import org.apache.flink.streaming.api.operators.AbstractStreamOperator; import org.apache.flink.streaming.api.operators.OneInputStreamOperator; @@ -29,9 +26,13 @@ import org.apache.flink.streaming.runtime.io.BlockingQueueBroker; import org.apache.flink.streaming.runtime.streamrecord.LatencyMarker; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; import org.apache.flink.util.OutputTag; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.TimeUnit; + /** * A special {@link StreamTask} that is used for executing feedback edges. This is used in * combination with {@link StreamIterationHead}. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java index bc66751..4dd708f 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java @@ -17,17 +17,6 @@ package org.apache.flink.streaming.runtime.tasks; -import java.io.Closeable; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.RunnableFuture; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.atomic.AtomicReference; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.accumulators.Accumulator; import org.apache.flink.api.common.typeutils.TypeSerializer; @@ -68,9 +57,22 @@ import org.apache.flink.util.CollectionUtil; import org.apache.flink.util.ExceptionUtils; import org.apache.flink.util.FutureUtil; import org.apache.flink.util.Preconditions; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.Closeable; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.RunnableFuture; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.atomic.AtomicReference; + /** * Base class for all streaming tasks. A task is the unit of local processing that is deployed * and executed by the TaskManagers. Each task runs one or more {@link StreamOperator}s which form @@ -833,7 +835,6 @@ public abstract class StreamTask<OUT, OP extends StreamOperator<OUT>> // Utilities // ------------------------------------------------------------------------ - @Override public String toString() { return getName(); http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SystemProcessingTimeService.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SystemProcessingTimeService.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SystemProcessingTimeService.java index 139c619..d00c1b9 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SystemProcessingTimeService.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SystemProcessingTimeService.java @@ -17,7 +17,10 @@ package org.apache.flink.streaming.runtime.tasks; -import static org.apache.flink.util.Preconditions.checkNotNull; +import org.apache.flink.annotation.VisibleForTesting; +import org.apache.flink.util.Preconditions; + +import javax.annotation.Nonnull; import java.util.concurrent.BlockingQueue; import java.util.concurrent.CancellationException; @@ -29,9 +32,8 @@ import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; -import javax.annotation.Nonnull; -import org.apache.flink.annotation.VisibleForTesting; -import org.apache.flink.util.Preconditions; + +import static org.apache.flink.util.Preconditions.checkNotNull; /** * A {@link ProcessingTimeService} which assigns as current processing time the result of calling @@ -56,7 +58,6 @@ public class SystemProcessingTimeService extends ProcessingTimeService { private final AtomicInteger status; - public SystemProcessingTimeService(AsyncExceptionHandler failureHandler, Object checkpointLock) { this(failureHandler, checkpointLock, null); } @@ -273,7 +274,6 @@ public class SystemProcessingTimeService extends ProcessingTimeService { private volatile boolean canceled; - private NeverCompleteFuture(long delayMillis) { this.delayMillis = delayMillis; } http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TestProcessingTimeService.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TestProcessingTimeService.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TestProcessingTimeService.java index 7beba5c..a9d5205 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TestProcessingTimeService.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TestProcessingTimeService.java @@ -17,6 +17,9 @@ package org.apache.flink.streaming.runtime.tasks; +import org.apache.flink.api.java.tuple.Tuple2; +import org.apache.flink.util.Preconditions; + import java.util.Comparator; import java.util.HashSet; import java.util.PriorityQueue; @@ -27,8 +30,6 @@ import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicReference; -import org.apache.flink.api.java.tuple.Tuple2; -import org.apache.flink.util.Preconditions; /** * This is a {@link ProcessingTimeService} used <b>strictly for testing</b> the http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TimerException.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TimerException.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TimerException.java index 0bd78ac..9b1b721 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TimerException.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TimerException.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.runtime.tasks; import org.apache.flink.annotation.Internal; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TwoInputStreamTask.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TwoInputStreamTask.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TwoInputStreamTask.java index 7214201..68722db 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TwoInputStreamTask.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/TwoInputStreamTask.java @@ -17,9 +17,6 @@ package org.apache.flink.streaming.runtime.tasks; -import java.util.ArrayList; -import java.util.List; - import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.runtime.io.network.partition.consumer.InputGate; @@ -28,6 +25,9 @@ import org.apache.flink.streaming.api.graph.StreamEdge; import org.apache.flink.streaming.api.operators.TwoInputStreamOperator; import org.apache.flink.streaming.runtime.io.StreamTwoInputProcessor; +import java.util.ArrayList; +import java.util.List; + /** * A {@link StreamTask} for executing a {@link TwoInputStreamOperator}. */ http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/package-info.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/package-info.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/package-info.java index a1179ff..1a97f23 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/package-info.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/package-info.java @@ -24,4 +24,5 @@ * <p>The tasks merely set up the distributed stream coordination and the checkpointing. * Internally, the tasks create one or more operators, perform the stream transformations. */ + package org.apache.flink.streaming.runtime.tasks; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/HDFSCopyFromLocal.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/HDFSCopyFromLocal.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/HDFSCopyFromLocal.java index 1f44dc6..833c13b 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/HDFSCopyFromLocal.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/HDFSCopyFromLocal.java @@ -15,16 +15,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.util; -import java.io.File; -import java.net.URI; import org.apache.flink.api.java.tuple.Tuple1; import org.apache.flink.runtime.fs.hdfs.HadoopFileSystem; + import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; +import java.io.File; +import java.net.URI; + /** * Utility for copying from local file system to a HDFS {@link FileSystem}. */ http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/HDFSCopyToLocal.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/HDFSCopyToLocal.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/HDFSCopyToLocal.java index 0a006f1..e3b45ed 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/HDFSCopyToLocal.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/HDFSCopyToLocal.java @@ -15,16 +15,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.flink.streaming.util; -import java.io.File; -import java.net.URI; import org.apache.flink.api.java.tuple.Tuple1; import org.apache.flink.runtime.fs.hdfs.HadoopFileSystem; + import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; +import java.io.File; +import java.net.URI; + /** * Utility for copying from a HDFS {@link FileSystem} to the local file system. */ http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/functions/StreamingFunctionUtils.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/functions/StreamingFunctionUtils.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/functions/StreamingFunctionUtils.java index 36abd47..4482431 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/functions/StreamingFunctionUtils.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/functions/StreamingFunctionUtils.java @@ -18,9 +18,6 @@ package org.apache.flink.streaming.util.functions; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.functions.Function; @@ -36,6 +33,10 @@ import org.apache.flink.streaming.api.checkpoint.ListCheckpointed; import org.apache.flink.streaming.api.operators.OutputTypeConfigurable; import org.apache.flink.util.Preconditions; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + /** * Utility class that contains helper methods to work with Flink Streaming * {@link Function Functions}. This is similar to http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/keys/KeySelectorUtil.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/keys/KeySelectorUtil.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/keys/KeySelectorUtil.java index e148a0b..27ce573 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/keys/KeySelectorUtil.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/keys/KeySelectorUtil.java @@ -17,10 +17,6 @@ package org.apache.flink.streaming.util.keys; -import static java.util.Objects.requireNonNull; - -import java.lang.reflect.Array; -import java.util.Arrays; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.functions.InvalidTypesException; @@ -36,6 +32,11 @@ import org.apache.flink.api.java.tuple.Tuple; import org.apache.flink.api.java.typeutils.ResultTypeQueryable; import org.apache.flink.api.java.typeutils.TupleTypeInfo; +import java.lang.reflect.Array; +import java.util.Arrays; + +import static java.util.Objects.requireNonNull; + /** * Utility class that contains helper methods to manipulating {@link KeySelector} for streaming. */ @@ -89,7 +90,6 @@ public final class KeySelectorUtil { return new ArrayKeySelector<>(positions, new TupleTypeInfo<>(primitiveInfos)); } - public static <X, K> KeySelector<X, K> getSelectorForOneKey( Keys<X> keys, Partitioner<K> partitioner, TypeInformation<X> typeInfo, ExecutionConfig executionConfig) { if (!(typeInfo instanceof CompositeType)) { http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/AbstractDeserializationSchema.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/AbstractDeserializationSchema.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/AbstractDeserializationSchema.java index d394e9b..02ea004 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/AbstractDeserializationSchema.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/AbstractDeserializationSchema.java @@ -18,10 +18,11 @@ package org.apache.flink.streaming.util.serialization; -import java.io.IOException; import org.apache.flink.api.common.typeinfo.TypeInformation; import org.apache.flink.api.java.typeutils.TypeExtractor; +import java.io.IOException; + /** * The deserialization schema describes how to turn the byte messages delivered by certain * data sources (for example Apache Kafka) into data types (Java/Scala objects) that are http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/DeserializationSchema.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/DeserializationSchema.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/DeserializationSchema.java index 57cb27e..15ecb2c 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/DeserializationSchema.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/DeserializationSchema.java @@ -17,12 +17,12 @@ package org.apache.flink.streaming.util.serialization; -import java.io.IOException; -import java.io.Serializable; - import org.apache.flink.annotation.Public; import org.apache.flink.api.java.typeutils.ResultTypeQueryable; +import java.io.IOException; +import java.io.Serializable; + /** * The deserialization schema describes how to turn the byte messages delivered by certain * data sources (for example Apache Kafka) into data types (Java/Scala objects) that are http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/SerializationSchema.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/SerializationSchema.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/SerializationSchema.java index 95428f6..986cfb3 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/SerializationSchema.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/SerializationSchema.java @@ -17,9 +17,10 @@ package org.apache.flink.streaming.util.serialization; -import java.io.Serializable; import org.apache.flink.annotation.Public; +import java.io.Serializable; + /** * The serialization schema describes how to turn a data object into a different serialized * representation. Most data sinks (for example Apache Kafka) require the data to be handed http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/SimpleStringSchema.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/SimpleStringSchema.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/SimpleStringSchema.java index e25daeb..27ba9e9 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/SimpleStringSchema.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/SimpleStringSchema.java @@ -17,15 +17,16 @@ package org.apache.flink.streaming.util.serialization; -import static org.apache.flink.util.Preconditions.checkNotNull; +import org.apache.flink.annotation.PublicEvolving; +import org.apache.flink.api.common.typeinfo.BasicTypeInfo; +import org.apache.flink.api.common.typeinfo.TypeInformation; import java.io.IOException; import java.io.ObjectOutputStream; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import org.apache.flink.annotation.PublicEvolving; -import org.apache.flink.api.common.typeinfo.BasicTypeInfo; -import org.apache.flink.api.common.typeinfo.TypeInformation; + +import static org.apache.flink.util.Preconditions.checkNotNull; /** * Very simple serialization schema for strings. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/TypeInformationSerializationSchema.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/TypeInformationSerializationSchema.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/TypeInformationSerializationSchema.java index 49ad52f..b187b04 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/TypeInformationSerializationSchema.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/TypeInformationSerializationSchema.java @@ -18,7 +18,6 @@ package org.apache.flink.streaming.util.serialization; -import java.io.IOException; import org.apache.flink.annotation.Public; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.typeinfo.TypeInformation; @@ -26,6 +25,8 @@ import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.runtime.util.DataInputDeserializer; import org.apache.flink.runtime.util.DataOutputSerializer; +import java.io.IOException; + /** * A serialization and deserialization schema that uses Flink's serialization stack to * transform typed from and to byte arrays. http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessor.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessor.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessor.java index 90c89ac..d165e25 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessor.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessor.java @@ -17,14 +17,6 @@ package org.apache.flink.streaming.util.typeutils; -import static org.apache.flink.util.Preconditions.checkNotNull; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; -import java.lang.reflect.Array; -import java.lang.reflect.Field; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.typeinfo.BasicTypeInfo; @@ -35,8 +27,18 @@ import org.apache.flink.api.java.typeutils.TupleTypeInfo; import org.apache.flink.api.java.typeutils.TupleTypeInfoBase; import org.apache.flink.api.java.typeutils.runtime.FieldSerializer; import org.apache.flink.api.java.typeutils.runtime.TupleSerializerBase; + import scala.Product; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.lang.reflect.Array; +import java.lang.reflect.Field; + +import static org.apache.flink.util.Preconditions.checkNotNull; + /** * These classes encapsulate the logic of accessing a field specified by the user as either an index @@ -333,7 +335,6 @@ public abstract class FieldAccessor<T, F> implements Serializable { } } - static final class RecursiveProductFieldAccessor<T, R, F> extends FieldAccessor<T, F> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/12b4185c/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessorFactory.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessorFactory.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessorFactory.java index c46422f..4447829 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessorFactory.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/typeutils/FieldAccessorFactory.java @@ -17,9 +17,6 @@ package org.apache.flink.streaming.util.typeutils; -import java.io.Serializable; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.operators.Keys; @@ -33,6 +30,10 @@ import org.apache.flink.api.java.typeutils.PojoTypeInfo; import org.apache.flink.api.java.typeutils.TupleTypeInfo; import org.apache.flink.api.java.typeutils.TupleTypeInfoBase; +import java.io.Serializable; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * Static factories for the {@link FieldAccessor} utilities.
