You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2017/03/18 07:13:45 UTC

[06/11] flink git commit: [FLINK-4460] Expose OutputTag constructor that takes TypeInformation

[FLINK-4460] Expose OutputTag constructor that takes TypeInformation


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

Branch: refs/heads/master
Commit: 5a44a51a4b5381fb5d892e8f9f8b2add9418c363
Parents: 07a15d0
Author: Aljoscha Krettek <al...@gmail.com>
Authored: Thu Feb 16 14:41:10 2017 +0100
Committer: Aljoscha Krettek <al...@gmail.com>
Committed: Sat Mar 18 07:44:17 2017 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/flink/util/OutputTag.java   | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/5a44a51a/flink-core/src/main/java/org/apache/flink/util/OutputTag.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/util/OutputTag.java b/flink-core/src/main/java/org/apache/flink/util/OutputTag.java
index eda3ab8..785855f 100644
--- a/flink-core/src/main/java/org/apache/flink/util/OutputTag.java
+++ b/flink-core/src/main/java/org/apache/flink/util/OutputTag.java
@@ -67,6 +67,17 @@ public class OutputTag<T> implements Serializable {
 		}
 	}
 
+	/**
+	 * Creates a new named {@code OutputTag} with the given id and output {@link TypeInformation}.
+	 *
+	 * @param id The id of the created {@code OutputTag}.
+	 * @param typeInfo The {@code TypeInformation} for the side output.
+	 */
+	public OutputTag(String id, TypeInformation<T> typeInfo) {
+		this.id = Preconditions.checkNotNull(id, "OutputTag id cannot be null.");
+		this.typeInfo = Preconditions.checkNotNull(typeInfo, "TypeInformation cannot be null.");
+	}
+
 	private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
 		in.defaultReadObject();
 		typeInfo = null;