Repository: flink
Updated Branches:
  refs/heads/master bc9982c36 -> 022cd628c


[FLINK-8837][annotations] Add @Experimental annotation and annotate some classes

This closes #5800.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/cdd20221
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/cdd20221
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/cdd20221

Branch: refs/heads/master
Commit: cdd202217449cc7db7abc3c9a9c8f29f6c463c18
Parents: 7d6afed
Author: Bowen Li <bowenl...@gmail.com>
Authored: Mon Apr 2 00:59:34 2018 -0700
Committer: zentol <ches...@apache.org>
Committed: Fri Apr 6 15:23:01 2018 +0200

----------------------------------------------------------------------
 .../apache/flink/annotation/Experimental.java   | 40 ++++++++++++++++++++
 .../api/datastream/DataStreamUtils.java         |  7 +---
 .../streaming/experimental/CollectSink.java     |  4 +-
 .../experimental/SocketStreamIterator.java      |  4 +-
 .../streaming/api/scala/DataStreamUtils.scala   |  4 +-
 5 files changed, 48 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/cdd20221/flink-annotations/src/main/java/org/apache/flink/annotation/Experimental.java
----------------------------------------------------------------------
diff --git 
a/flink-annotations/src/main/java/org/apache/flink/annotation/Experimental.java 
b/flink-annotations/src/main/java/org/apache/flink/annotation/Experimental.java
new file mode 100644
index 0000000..7ddcb1a
--- /dev/null
+++ 
b/flink-annotations/src/main/java/org/apache/flink/annotation/Experimental.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.flink.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to mark classes for experimental use.
+ *
+ * <p>Classes with this annotation are neither battle-tested nor stable, and 
may be changed or removed
+ * in future versions.
+ *
+ * <p>This annotation also excludes classes with evolving interfaces / 
signatures
+ * annotated with {@link Public} and {@link PublicEvolving}.
+ *
+ */
+@Documented
+@Target(ElementType.TYPE)
+@Public
+public @interface Experimental {
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/cdd20221/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStreamUtils.java
----------------------------------------------------------------------
diff --git 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStreamUtils.java
 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStreamUtils.java
index 351c456..32271b6 100644
--- 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStreamUtils.java
+++ 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStreamUtils.java
@@ -17,7 +17,7 @@
 
 package org.apache.flink.streaming.api.datastream;
 
-import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.annotation.Experimental;
 import org.apache.flink.api.common.typeinfo.TypeInformation;
 import org.apache.flink.api.common.typeutils.TypeSerializer;
 import org.apache.flink.api.java.functions.KeySelector;
@@ -39,11 +39,8 @@ import java.util.Iterator;
 
 /**
  * A collection of utilities for {@link DataStream DataStreams}.
- *
- * <p>This experimental class is relocated from flink-streaming-contrib. 
Please see package-info.java
- * for more information.
  */
-@PublicEvolving
+@Experimental
 public final class DataStreamUtils {
 
        /**

http://git-wip-us.apache.org/repos/asf/flink/blob/cdd20221/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/CollectSink.java
----------------------------------------------------------------------
diff --git 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/CollectSink.java
 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/CollectSink.java
index 981f8e1..195d705 100644
--- 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/CollectSink.java
+++ 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/CollectSink.java
@@ -17,7 +17,7 @@
 
 package org.apache.flink.streaming.experimental;
 
-import org.apache.flink.annotation.Internal;
+import org.apache.flink.annotation.Experimental;
 import org.apache.flink.api.common.typeutils.TypeSerializer;
 import org.apache.flink.configuration.Configuration;
 import org.apache.flink.core.memory.DataOutputViewStreamWrapper;
@@ -34,7 +34,7 @@ import java.net.Socket;
  * <p>This experimental class is relocated from flink-streaming-contrib. 
Please see package-info.java
  * for more information.
  */
-@Internal
+@Experimental
 public class CollectSink<IN> extends RichSinkFunction<IN> {
 
        private static final long serialVersionUID = 1L;

http://git-wip-us.apache.org/repos/asf/flink/blob/cdd20221/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/SocketStreamIterator.java
----------------------------------------------------------------------
diff --git 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/SocketStreamIterator.java
 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/SocketStreamIterator.java
index 62d46e1..bc730cb 100644
--- 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/SocketStreamIterator.java
+++ 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/SocketStreamIterator.java
@@ -17,7 +17,7 @@
 
 package org.apache.flink.streaming.experimental;
 
-import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.annotation.Experimental;
 import org.apache.flink.api.common.typeutils.TypeSerializer;
 import org.apache.flink.core.memory.DataInputViewStreamWrapper;
 
@@ -41,7 +41,7 @@ import java.util.NoSuchElementException;
  *
  * @param <T> The type of elements returned from the iterator.
  */
-@PublicEvolving
+@Experimental
 public class SocketStreamIterator<T> implements Iterator<T> {
 
        /** Server socket to listen at. */

http://git-wip-us.apache.org/repos/asf/flink/blob/cdd20221/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStreamUtils.scala
----------------------------------------------------------------------
diff --git 
a/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStreamUtils.scala
 
b/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStreamUtils.scala
index 0f42aa2..fd48f9c 100644
--- 
a/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStreamUtils.scala
+++ 
b/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStreamUtils.scala
@@ -18,7 +18,7 @@
 
 package org.apache.flink.streaming.api.scala
 
-import org.apache.flink.annotation.PublicEvolving
+import org.apache.flink.annotation.Experimental
 import org.apache.flink.api.common.typeinfo.TypeInformation
 import org.apache.flink.streaming.api.datastream.{DataStreamUtils => 
JavaStreamUtils}
 
@@ -33,7 +33,7 @@ import scala.reflect.ClassTag
   *
   * @param self DataStream
   */
-@PublicEvolving
+@Experimental
 class DataStreamUtils[T: TypeInformation : ClassTag](val self: DataStream[T]) {
 
   /**

Reply via email to