Package org.apache.flink.util
Class OutputTag<T>
- java.lang.Object
-
- org.apache.flink.util.OutputTag<T>
-
- Type Parameters:
T
- the type of elements in the side-output stream.
- All Implemented Interfaces:
Serializable
@PublicEvolving public class OutputTag<T> extends Object implements Serializable
AnOutputTag
is a typed and named tag to use for tagging side outputs of an operator.An
OutputTag
must always be an anonymous inner class so that Flink can derive aTypeInformation
for the generic type parameter.Example:
OutputTag<Tuple2<String, Long>> info = new OutputTag<Tuple2<String, Long>>("late-data"){};
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OutputTag(String id)
Creates a new namedOutputTag
with the given id.OutputTag(String id, TypeInformation<T> typeInfo)
Creates a new namedOutputTag
with the given id and outputTypeInformation
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getId()
TypeInformation<T>
getTypeInfo()
int
hashCode()
static boolean
isResponsibleFor(OutputTag<?> owner, OutputTag<?> other)
String
toString()
-
-
-
Constructor Detail
-
OutputTag
public OutputTag(String id)
Creates a new namedOutputTag
with the given id.- Parameters:
id
- The id of the createdOutputTag
.
-
OutputTag
public OutputTag(String id, TypeInformation<T> typeInfo)
Creates a new namedOutputTag
with the given id and outputTypeInformation
.- Parameters:
id
- The id of the createdOutputTag
.typeInfo
- TheTypeInformation
for the side output.
-
-
Method Detail
-
isResponsibleFor
public static boolean isResponsibleFor(@Nullable OutputTag<?> owner, @Nonnull OutputTag<?> other)
-
getId
public String getId()
-
getTypeInfo
public TypeInformation<T> getTypeInfo()
-
-