http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/Triggerable.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/Triggerable.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/Triggerable.java index 50d1cb6..9ca3f33 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/Triggerable.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/Triggerable.java @@ -18,10 +18,13 @@ package org.apache.flink.streaming.runtime.operators; +import org.apache.flink.annotation.Internal; + /** * This interface must be implemented by objects that are triggered by the timer service available * to stream operators in {@link org.apache.flink.streaming.api.environment.StreamExecutionEnvironment}. */ +@Internal public interface Triggerable { /**
http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 bc31791..6e00240 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 @@ -20,6 +20,7 @@ package org.apache.flink.streaming.runtime.operators.windowing; 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; import org.apache.flink.api.java.functions.KeySelector; @@ -38,6 +39,7 @@ import org.apache.flink.streaming.runtime.tasks.StreamTaskState; import static java.util.Objects.requireNonNull; +@Internal public abstract class AbstractAlignedProcessingTimeWindowOperator<KEY, IN, OUT, STATE, F extends Function> extends AbstractUdfStreamOperator<OUT, F> implements OneInputStreamOperator<IN, OUT>, Triggerable { http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 89ce47b..026258c 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,6 +18,7 @@ package org.apache.flink.streaming.runtime.operators.windowing; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.core.memory.DataInputView; import org.apache.flink.core.memory.DataOutputView; @@ -32,6 +33,7 @@ import java.util.Iterator; /** * Base class for a multiple key/value maps organized in panes. */ +@Internal public abstract class AbstractKeyedTimePanes<Type, Key, Aggregate, Result> { private static final int BEGIN_OF_STATE_MAGIC_NUMBER = 0x0FF1CE42; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 30c40bb..b830789 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,6 +18,7 @@ package org.apache.flink.streaming.runtime.operators.windowing; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.java.functions.KeySelector; import org.apache.flink.runtime.util.UnionIterator; import org.apache.flink.streaming.api.functions.windowing.WindowFunction; @@ -28,7 +29,7 @@ import org.apache.flink.util.Collector; import java.util.ArrayList; - +@Internal public class AccumulatingKeyedTimePanes<Type, Key, Result> extends AbstractKeyedTimePanes<Type, Key, ArrayList<Type>, Result> { private final KeySelector<Type, Key> keySelector; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 da64df8..2f0d4fe 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,6 +18,7 @@ package org.apache.flink.streaming.runtime.operators.windowing; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.functions.Function; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.api.java.functions.KeySelector; @@ -30,7 +31,7 @@ import org.apache.flink.streaming.api.windowing.windows.Window; import java.io.IOException; import java.util.ArrayList; - +@Internal public class AccumulatingProcessingTimeWindowOperator<KEY, IN, OUT> extends AbstractAlignedProcessingTimeWindowOperator<KEY, IN, OUT, ArrayList<IN>, WindowFunction<Iterable<IN>, OUT, KEY, TimeWindow>> { http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AggregatingKeyedTimePanes.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AggregatingKeyedTimePanes.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AggregatingKeyedTimePanes.java index 8599bc1..dfa357e 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AggregatingKeyedTimePanes.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AggregatingKeyedTimePanes.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.api.java.functions.KeySelector; import org.apache.flink.streaming.api.operators.AbstractStreamOperator; import org.apache.flink.streaming.api.windowing.windows.TimeWindow; import org.apache.flink.util.Collector; - +@Internal public class AggregatingKeyedTimePanes<Type, Key> extends AbstractKeyedTimePanes<Type, Key, Type, Type> { private final KeySelector<Type, Key> keySelector; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 0e07cea..9d85cf0 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 @@ -18,11 +18,13 @@ package org.apache.flink.streaming.runtime.operators.windowing; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.functions.Function; import org.apache.flink.api.common.functions.ReduceFunction; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.api.java.functions.KeySelector; +@Internal public class AggregatingProcessingTimeWindowOperator<KEY, IN> extends AbstractAlignedProcessingTimeWindowOperator<KEY, IN, IN, IN, ReduceFunction<IN>> { http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingNonKeyedWindowOperator.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingNonKeyedWindowOperator.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingNonKeyedWindowOperator.java index 73972e6..8122fc6 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingNonKeyedWindowOperator.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingNonKeyedWindowOperator.java @@ -18,6 +18,7 @@ package org.apache.flink.streaming.runtime.operators.windowing; import com.google.common.annotations.VisibleForTesting; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.streaming.api.functions.windowing.AllWindowFunction; import org.apache.flink.streaming.api.windowing.assigners.WindowAssigner; @@ -38,6 +39,7 @@ import static java.util.Objects.requireNonNull; * @param <OUT> The type of elements emitted by the {@code WindowFunction}. * @param <W> The type of {@code Window} that the {@code WindowAssigner} assigns. */ +@Internal public class EvictingNonKeyedWindowOperator<IN, OUT, W extends Window> extends NonKeyedWindowOperator<IN, OUT, W> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 a960ac4..492f846 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 @@ -21,6 +21,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import com.google.common.collect.FluentIterable; import com.google.common.collect.Iterables; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.state.ListState; import org.apache.flink.api.common.state.MergingState; import org.apache.flink.api.common.state.StateDescriptor; @@ -50,6 +51,7 @@ import static java.util.Objects.requireNonNull; * @param <OUT> The type of elements emitted by the {@code WindowFunction}. * @param <W> The type of {@code Window} that the {@code WindowAssigner} assigns. */ +@Internal public class EvictingWindowOperator<K, IN, OUT, W extends Window> extends WindowOperator<K, IN, Iterable<IN>, OUT, W> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 3f44c4a..67a2aac 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,6 +18,7 @@ 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.runtime.util.MathUtils; @@ -41,6 +42,7 @@ import java.util.NoSuchElementException; * <li>The map supports no removal/shrinking.</li> * </ul> */ +@Internal public class KeyMap<K, V> implements Iterable<KeyMap.Entry<K, V>> { /** The minimum table capacity, 64 entries */ http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/NonKeyedWindowOperator.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/NonKeyedWindowOperator.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/NonKeyedWindowOperator.java index 93761e6..70f4df2 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/NonKeyedWindowOperator.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/NonKeyedWindowOperator.java @@ -18,6 +18,7 @@ package org.apache.flink.streaming.runtime.operators.windowing; import com.google.common.annotations.VisibleForTesting; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.state.State; import org.apache.flink.api.common.state.StateDescriptor; @@ -74,6 +75,7 @@ import static java.util.Objects.requireNonNull; * @param <OUT> The type of elements emitted by the {@code WindowFunction}. * @param <W> The type of {@code Window} that the {@code WindowAssigner} assigns. */ +@Internal public class NonKeyedWindowOperator<IN, OUT, W extends Window> extends AbstractUdfStreamOperator<OUT, AllWindowFunction<Iterable<IN>, OUT, W>> implements OneInputStreamOperator<IN, OUT>, Triggerable, InputTypeConfigurable { http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 5fc89e8..d466b1e 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,6 +18,7 @@ package org.apache.flink.streaming.runtime.operators.windowing; import com.google.common.annotations.VisibleForTesting; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.state.MergingState; import org.apache.flink.api.common.state.State; @@ -86,6 +87,7 @@ import static java.util.Objects.requireNonNull; * @param <OUT> The type of elements emitted by the {@code WindowFunction}. * @param <W> The type of {@code Window} that the {@code WindowAssigner} assigns. */ +@Internal public class WindowOperator<K, IN, ACC, OUT, W extends Window> extends AbstractUdfStreamOperator<OUT, WindowFunction<ACC, OUT, K, W>> implements OneInputStreamOperator<IN, OUT>, Triggerable, InputTypeConfigurable { http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/EvictingWindowBuffer.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/EvictingWindowBuffer.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/EvictingWindowBuffer.java index 28365e1..25a8211 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/EvictingWindowBuffer.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/EvictingWindowBuffer.java @@ -17,6 +17,8 @@ */ package org.apache.flink.streaming.runtime.operators.windowing.buffers; +import org.apache.flink.annotation.Internal; + /** * A {@code WindowBuffer} that can also evict elements from the buffer. The order in which * the elements are added is preserved. Elements can only be evicted started from the beginning of @@ -24,7 +26,7 @@ package org.apache.flink.streaming.runtime.operators.windowing.buffers; * * @param <T> The type of elements that this {@code WindowBuffer} can store. */ - +@Internal public interface EvictingWindowBuffer<T> extends WindowBuffer<T> { /** http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/HeapWindowBuffer.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/HeapWindowBuffer.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/HeapWindowBuffer.java index f9f8b26..9db449b 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/HeapWindowBuffer.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/HeapWindowBuffer.java @@ -19,6 +19,7 @@ package org.apache.flink.streaming.runtime.operators.windowing.buffers; import com.google.common.base.Function; import com.google.common.collect.FluentIterable; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.functions.RuntimeContext; import org.apache.flink.configuration.Configuration; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; @@ -30,6 +31,7 @@ import java.util.ArrayDeque; * * @param <T> The type of elements that this {@code WindowBuffer} can store. */ +@Internal public class HeapWindowBuffer<T> implements EvictingWindowBuffer<T> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/PreAggregatingHeapWindowBuffer.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/PreAggregatingHeapWindowBuffer.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/PreAggregatingHeapWindowBuffer.java index 37be8f0..5f8de4b 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/PreAggregatingHeapWindowBuffer.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/PreAggregatingHeapWindowBuffer.java @@ -17,6 +17,7 @@ */ package org.apache.flink.streaming.runtime.operators.windowing.buffers; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.functions.ReduceFunction; import org.apache.flink.api.common.functions.RuntimeContext; import org.apache.flink.api.common.functions.util.FunctionUtils; @@ -31,7 +32,7 @@ import java.util.Collections; * * @param <T> The type of elements that this {@code WindowBuffer} can store. */ - +@Internal public class PreAggregatingHeapWindowBuffer<T> implements WindowBuffer<T> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/WindowBuffer.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/WindowBuffer.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/WindowBuffer.java index b111667..cbf7dda 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/WindowBuffer.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/WindowBuffer.java @@ -18,6 +18,7 @@ package org.apache.flink.streaming.runtime.operators.windowing.buffers; +import org.apache.flink.annotation.Internal; import org.apache.flink.streaming.api.windowing.windows.Window; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; @@ -37,6 +38,7 @@ import java.io.Serializable; * * @param <T> The type of elements that this {@code WindowBuffer} can store. */ +@Internal public interface WindowBuffer<T> extends Serializable { /** http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/WindowBufferFactory.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/WindowBufferFactory.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/WindowBufferFactory.java index 4bcdf09..a4f4b27 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/WindowBufferFactory.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/buffers/WindowBufferFactory.java @@ -17,6 +17,7 @@ */ package org.apache.flink.streaming.runtime.operators.windowing.buffers; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.functions.RuntimeContext; import org.apache.flink.configuration.Configuration; @@ -28,6 +29,7 @@ import java.io.Serializable; * @param <T> The type of elements that the created {@code WindowBuffer} can store. * @param <B> The type of the created {@code WindowBuffer} */ +@Internal public interface WindowBufferFactory<T, B extends WindowBuffer<T>> extends Serializable { /** http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/BroadcastPartitioner.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/BroadcastPartitioner.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/BroadcastPartitioner.java index f3d851c..3d0e108 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/BroadcastPartitioner.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/BroadcastPartitioner.java @@ -17,6 +17,7 @@ package org.apache.flink.streaming.runtime.partitioner; +import org.apache.flink.annotation.Internal; import org.apache.flink.runtime.plugable.SerializationDelegate; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; @@ -25,6 +26,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; * * @param <T> Type of the elements in the Stream being broadcast */ +@Internal public class BroadcastPartitioner<T> extends StreamPartitioner<T> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/CustomPartitionerWrapper.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/CustomPartitionerWrapper.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/CustomPartitionerWrapper.java index 7bb9480..a51cede 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/CustomPartitionerWrapper.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/CustomPartitionerWrapper.java @@ -17,6 +17,7 @@ package org.apache.flink.streaming.runtime.partitioner; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.functions.Partitioner; import org.apache.flink.api.java.functions.KeySelector; import org.apache.flink.runtime.plugable.SerializationDelegate; @@ -30,6 +31,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; * @param <T> * Type of the data */ +@Internal public class CustomPartitionerWrapper<K, T> extends StreamPartitioner<T> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/ForwardPartitioner.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/ForwardPartitioner.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/ForwardPartitioner.java index 4fb460c..ad313fd 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/ForwardPartitioner.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/ForwardPartitioner.java @@ -17,6 +17,7 @@ package org.apache.flink.streaming.runtime.partitioner; +import org.apache.flink.annotation.Internal; import org.apache.flink.runtime.plugable.SerializationDelegate; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; @@ -25,6 +26,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; * * @param <T> Type of the elements in the Stream */ +@Internal public class ForwardPartitioner<T> extends StreamPartitioner<T> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/GlobalPartitioner.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/GlobalPartitioner.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/GlobalPartitioner.java index b19fb41..bc77d54 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/GlobalPartitioner.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/GlobalPartitioner.java @@ -17,6 +17,7 @@ package org.apache.flink.streaming.runtime.partitioner; +import org.apache.flink.annotation.Internal; import org.apache.flink.runtime.plugable.SerializationDelegate; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; @@ -25,6 +26,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; * * @param <T> Type of the elements in the Stream being partitioned */ +@Internal public class GlobalPartitioner<T> extends StreamPartitioner<T> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/HashPartitioner.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/HashPartitioner.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/HashPartitioner.java index a3f5158..ec0cf94 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/HashPartitioner.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/HashPartitioner.java @@ -17,6 +17,7 @@ package org.apache.flink.streaming.runtime.partitioner; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.java.functions.KeySelector; import org.apache.flink.runtime.plugable.SerializationDelegate; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; @@ -27,6 +28,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; * * @param <T> Type of the elements in the Stream being partitioned */ +@Internal public class HashPartitioner<T> extends StreamPartitioner<T> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/RebalancePartitioner.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/RebalancePartitioner.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/RebalancePartitioner.java index 2dfff0e..dd2d4ff 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/RebalancePartitioner.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/RebalancePartitioner.java @@ -17,6 +17,7 @@ package org.apache.flink.streaming.runtime.partitioner; +import org.apache.flink.annotation.Internal; import org.apache.flink.runtime.plugable.SerializationDelegate; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; @@ -26,6 +27,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; * * @param <T> Type of the elements in the Stream being rebalanced */ +@Internal public class RebalancePartitioner<T> extends StreamPartitioner<T> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/RescalePartitioner.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/RescalePartitioner.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/RescalePartitioner.java index 063e64a..a6d9d0d 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/RescalePartitioner.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/RescalePartitioner.java @@ -17,6 +17,7 @@ package org.apache.flink.streaming.runtime.partitioner; +import org.apache.flink.annotation.Internal; import org.apache.flink.runtime.jobgraph.DistributionPattern; import org.apache.flink.runtime.plugable.SerializationDelegate; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; @@ -43,6 +44,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; * * @param <T> Type of the elements in the Stream being rescaled */ +@Internal public class RescalePartitioner<T> extends StreamPartitioner<T> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 93c6f9c..36c123a 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 @@ -19,6 +19,7 @@ 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; @@ -29,6 +30,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; * @param <T> * Type of the Tuple */ +@Internal public class ShufflePartitioner<T> extends StreamPartitioner<T> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 4ef360d..6b4a810 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 @@ -18,10 +18,12 @@ package org.apache.flink.streaming.runtime.partitioner; import java.io.Serializable; +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; +@Internal public abstract class StreamPartitioner<T> implements ChannelSelector<SerializationDelegate<StreamRecord<T>>>, Serializable { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/MultiplexingStreamRecordSerializer.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/MultiplexingStreamRecordSerializer.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/MultiplexingStreamRecordSerializer.java index d4363cd..896b8e5 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/MultiplexingStreamRecordSerializer.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/MultiplexingStreamRecordSerializer.java @@ -19,6 +19,7 @@ package org.apache.flink.streaming.runtime.streamrecord; import com.google.common.base.Preconditions; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.core.memory.DataInputView; import org.apache.flink.core.memory.DataOutputView; @@ -36,6 +37,7 @@ import java.io.IOException; * * @param <T> The type of value in the {@link org.apache.flink.streaming.runtime.streamrecord.StreamRecord} */ +@Internal public final class MultiplexingStreamRecordSerializer<T> extends TypeSerializer<StreamElement> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamElement.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamElement.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamElement.java index 80df72e..f6cccf7 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamElement.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamElement.java @@ -18,11 +18,13 @@ package org.apache.flink.streaming.runtime.streamrecord; +import org.apache.flink.annotation.Internal; import org.apache.flink.streaming.api.watermark.Watermark; /** * An element in a data stream. Can be a record or a Watermark. */ +@Internal public abstract class StreamElement { /** http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java index 363557c..8ae4e88 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java @@ -18,11 +18,14 @@ package org.apache.flink.streaming.runtime.streamrecord; +import org.apache.flink.annotation.Internal; + /** * One value in a data stream. This stores the value and the associated timestamp. * * @param <T> The type encapsulated with the stream record. */ +@Internal public class StreamRecord<T> extends StreamElement { /** The actual value held by this record */ http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecordSerializer.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecordSerializer.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecordSerializer.java index d47da50..0fe9c35 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecordSerializer.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecordSerializer.java @@ -21,6 +21,7 @@ package org.apache.flink.streaming.runtime.streamrecord; import java.io.IOException; import com.google.common.base.Preconditions; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.core.memory.DataInputView; import org.apache.flink.core.memory.DataOutputView; @@ -38,6 +39,7 @@ import org.apache.flink.core.memory.DataOutputView; * * @param <T> The type of value in the {@link StreamRecord} */ +@Internal public final class StreamRecordSerializer<T> extends TypeSerializer<StreamRecord<T>> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/AsynchronousException.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/AsynchronousException.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/AsynchronousException.java index 5b3fee0..311e0cd 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/AsynchronousException.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/AsynchronousException.java @@ -17,10 +17,13 @@ */ package org.apache.flink.streaming.runtime.tasks; +import org.apache.flink.annotation.Internal; + /** * {@code RuntimeException} for wrapping exceptions that are thrown in Threads that are not the * main compute Thread. */ +@Internal public class AsynchronousException extends RuntimeException { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 ec90bff..c36d45d 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,14 @@ package org.apache.flink.streaming.runtime.tasks; +import org.apache.flink.annotation.Internal; + import static java.util.Objects.requireNonNull; /** * A special exception that signifies that the cause exception came from a chained operator. */ +@Internal public class ExceptionInChainedOperatorException extends RuntimeException { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTask.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTask.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTask.java index 5316ae4..ceffc1c 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTask.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTask.java @@ -18,6 +18,7 @@ package org.apache.flink.streaming.runtime.tasks; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.runtime.accumulators.AccumulatorRegistry; import org.apache.flink.runtime.io.network.partition.consumer.InputGate; @@ -25,6 +26,7 @@ import org.apache.flink.streaming.api.graph.StreamConfig; import org.apache.flink.streaming.api.operators.OneInputStreamOperator; import org.apache.flink.streaming.runtime.io.StreamInputProcessor; +@Internal public class OneInputStreamTask<IN, OUT> extends StreamTask<OUT, OneInputStreamOperator<IN, OUT>> { private StreamInputProcessor<IN> inputProcessor; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 5313bc9..4ce2f64 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 @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.runtime.accumulators.AccumulatorRegistry; @@ -53,6 +54,7 @@ import org.slf4j.LoggerFactory; * @param <OUT> The type of elements accepted by the chain, i.e., the input type of the chain's * head operator. */ +@Internal public class OperatorChain<OUT> { private static final Logger LOG = LoggerFactory.getLogger(OperatorChain.class); http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 3d82275..61dcf72 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 @@ -18,6 +18,7 @@ package org.apache.flink.streaming.runtime.tasks; +import org.apache.flink.annotation.Internal; import org.apache.flink.streaming.api.operators.Output; import org.apache.flink.streaming.api.operators.StreamSource; import org.apache.flink.streaming.api.watermark.Watermark; @@ -35,6 +36,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; * * @param <OUT> Type of the output elements of this source. */ +@Internal public class SourceStreamTask<OUT> extends StreamTask<OUT, StreamSource<OUT>> { @Override http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 c9d4f1c..6c57026 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 @@ -21,6 +21,7 @@ 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.RecordWriterOutput; @@ -29,6 +30,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@Internal public class StreamIterationHead<OUT> extends OneInputStreamTask<OUT, OUT> { private static final Logger LOG = LoggerFactory.getLogger(StreamIterationHead.class); http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 0d0f212..af7d3f9 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 @@ -20,6 +20,7 @@ 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; import org.apache.flink.streaming.api.watermark.Watermark; @@ -28,6 +29,7 @@ import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@Internal public class StreamIterationTail<IN> extends OneInputStreamTask<IN, IN> { private static final Logger LOG = LoggerFactory.getLogger(StreamIterationTail.class); http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 9b5c64a..500a440 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 @@ -27,6 +27,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.accumulators.Accumulator; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.configuration.ConfigConstants; @@ -95,6 +96,7 @@ import org.slf4j.LoggerFactory; * @param <OUT> * @param <Operator> */ +@Internal public abstract class StreamTask<OUT, Operator extends StreamOperator<OUT>> extends AbstractInvokable implements StatefulTask<StreamTaskStateList> { http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskException.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskException.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskException.java index 5680810..94e2213 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskException.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskException.java @@ -17,10 +17,13 @@ package org.apache.flink.streaming.runtime.tasks; +import org.apache.flink.annotation.Internal; + /** * An exception that is thrown by the stream vertices when encountering an * illegal condition. */ +@Internal public class StreamTaskException extends RuntimeException { /** http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskState.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskState.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskState.java index ace9cfd..b90f823 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskState.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskState.java @@ -18,6 +18,7 @@ package org.apache.flink.streaming.runtime.tasks; +import org.apache.flink.annotation.Internal; import org.apache.flink.runtime.state.StateHandle; import org.apache.flink.runtime.state.KvStateSnapshot; @@ -35,6 +36,7 @@ import java.util.Iterator; * <li>The key/value state of the operator, if it executes on a KeyedDataStream.</li> * </ul> */ +@Internal public class StreamTaskState implements Serializable { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskStateList.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskStateList.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskStateList.java index c9946e1..d8a5b2f 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskStateList.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTaskStateList.java @@ -18,6 +18,7 @@ package org.apache.flink.streaming.runtime.tasks; +import org.apache.flink.annotation.Internal; import org.apache.flink.runtime.state.KvStateSnapshot; import org.apache.flink.runtime.state.StateHandle; @@ -26,6 +27,7 @@ import java.util.HashMap; /** * List of task states for a chain of streaming tasks. */ +@Internal public class StreamTaskStateList implements StateHandle<StreamTaskState[]> { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 0ea6ea5..2e39725 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 @@ -17,10 +17,13 @@ */ package org.apache.flink.streaming.runtime.tasks; +import org.apache.flink.annotation.Internal; + /** * {@code RuntimeException} for wrapping exceptions that are thrown in the timer callback of * the timer service in {@link StreamTask}. */ +@Internal public class TimerException extends AsynchronousException { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 d2d8a2e..132f965 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 @@ -20,6 +20,7 @@ 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.accumulators.AccumulatorRegistry; import org.apache.flink.runtime.io.network.partition.consumer.InputGate; @@ -28,6 +29,7 @@ import org.apache.flink.streaming.api.graph.StreamEdge; import org.apache.flink.streaming.api.operators.TwoInputStreamOperator; import org.apache.flink.streaming.runtime.io.StreamTwoInputProcessor; +@Internal public class TwoInputStreamTask<IN1, IN2, OUT> extends StreamTask<OUT, TwoInputStreamOperator<IN1, IN2, OUT>> { private StreamTwoInputProcessor<IN1, IN2> inputProcessor; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/FieldAccessor.java ---------------------------------------------------------------------- diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/FieldAccessor.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/FieldAccessor.java index ba8a55b..b1d34e7 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/FieldAccessor.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/FieldAccessor.java @@ -17,6 +17,7 @@ package org.apache.flink.streaming.util; +import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.typeinfo.BasicArrayTypeInfo; import org.apache.flink.api.common.typeinfo.BasicTypeInfo; @@ -42,6 +43,7 @@ import scala.Product; * or a field expression string. TypeInformation can also be requested for the field. * The position index might specify a field of a Tuple, an array, or a simple type (only "0th field"). */ +@Internal public abstract class FieldAccessor<R, F> implements Serializable { private static final long serialVersionUID = 1L; http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 cf40a3b..6f65b05 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 @@ -20,6 +20,7 @@ package org.apache.flink.streaming.util.keys; 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; import org.apache.flink.api.common.functions.Partitioner; @@ -39,6 +40,7 @@ import static java.util.Objects.requireNonNull; /** * Utility class that contains helper methods to manipulating {@link KeySelector} for streaming. */ +@Internal public final class KeySelectorUtil { public static <X> KeySelector<X, Tuple> getSelectorForKeys(Keys<X> keys, TypeInformation<X> typeInfo, ExecutionConfig executionConfig) { http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/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 ca498c0..a051d32 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,12 +17,14 @@ package org.apache.flink.streaming.util.serialization; +import org.apache.flink.annotation.PublicEvolving; import org.apache.flink.api.common.typeinfo.BasicTypeInfo; import org.apache.flink.api.common.typeinfo.TypeInformation; /** * Very simple serialization schema for strings. */ +@PublicEvolving public class SimpleStringSchema implements DeserializationSchema<String>, SerializationSchema<String> { http://git-wip-us.apache.org/repos/asf/flink/blob/c9db63b9/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/ConnectedStreams.scala ---------------------------------------------------------------------- diff --git a/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/ConnectedStreams.scala b/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/ConnectedStreams.scala index 243e06e..c3ea144 100644 --- a/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/ConnectedStreams.scala +++ b/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/ConnectedStreams.scala @@ -18,7 +18,7 @@ package org.apache.flink.streaming.api.scala -import org.apache.flink.annotation.Public +import org.apache.flink.annotation.{Internal, Public} import org.apache.flink.api.common.typeinfo.TypeInformation import org.apache.flink.api.java.functions.KeySelector import org.apache.flink.api.java.typeutils.ResultTypeQueryable @@ -39,6 +39,7 @@ class ConnectedStreams[IN1, IN2](javaStream: JavaCStream[IN1, IN2]) { /** * Applies a CoMap transformation on a {@link ConnectedStreams} and maps * the output to a common type. The transformation calls a + * * @param fun1 for each element of the first input and * @param fun2 for each element of the second input. Each * CoMapFunction call returns exactly one element. @@ -114,11 +115,11 @@ class ConnectedStreams[IN1, IN2](javaStream: JavaCStream[IN1, IN2]) { /** * Applies a CoFlatMap transformation on a {@link ConnectedStreams} and * maps the output to a common type. The transformation calls a + * * @param fun1 for each element of the first input * and @param fun2 for each element of the second * input. Each CoFlatMapFunction call returns any number of elements * including none. - * * @return The transformed { @link DataStream} */ def flatMap[R: TypeInformation: ClassTag](fun1: (IN1, Collector[R]) => Unit, @@ -138,11 +139,11 @@ class ConnectedStreams[IN1, IN2](javaStream: JavaCStream[IN1, IN2]) { /** * Applies a CoFlatMap transformation on a {@link ConnectedStreams} and * maps the output to a common type. The transformation calls a + * * @param fun1 for each element of the first input * and @param fun2 for each element of the second * input. Each CoFlatMapFunction call returns any number of elements * including none. - * * @return The transformed { @link DataStream} */ def flatMap[R: TypeInformation: ClassTag](fun1: IN1 => TraversableOnce[R], @@ -356,6 +357,7 @@ class ConnectedStreams[IN1, IN2](javaStream: JavaCStream[IN1, IN2]) { } +@Internal class KeySelectorWithType[IN, K]( private[this] val fun: IN => K, private[this] val info: TypeInformation[K])
