Java Code Examples for org.apache.flink.api.java.typeutils.runtime.Tuple0Serializer

The following examples show how to use org.apache.flink.api.java.typeutils.runtime.Tuple0Serializer. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Flink-CEPplus   Source File: TupleTypeInfo.java    License: Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
@PublicEvolving
public TupleSerializer<T> createSerializer(ExecutionConfig executionConfig) {
	if (getTypeClass() == Tuple0.class) {
		return (TupleSerializer<T>) Tuple0Serializer.INSTANCE;
	}

	TypeSerializer<?>[] fieldSerializers = new TypeSerializer<?>[getArity()];
	for (int i = 0; i < types.length; i++) {
		fieldSerializers[i] = types[i].createSerializer(executionConfig);
	}
	
	Class<T> tupleClass = getTypeClass();
	
	return new TupleSerializer<T>(tupleClass, fieldSerializers);
}
 
Example 2
Source Project: flink   Source File: TupleTypeInfo.java    License: Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
@PublicEvolving
public TupleSerializer<T> createSerializer(ExecutionConfig executionConfig) {
	if (getTypeClass() == Tuple0.class) {
		return (TupleSerializer<T>) Tuple0Serializer.INSTANCE;
	}

	TypeSerializer<?>[] fieldSerializers = new TypeSerializer<?>[getArity()];
	for (int i = 0; i < types.length; i++) {
		fieldSerializers[i] = types[i].createSerializer(executionConfig);
	}
	
	Class<T> tupleClass = getTypeClass();
	
	return new TupleSerializer<T>(tupleClass, fieldSerializers);
}
 
Example 3
Source Project: flink   Source File: TupleTypeInfo.java    License: Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
@PublicEvolving
public TupleSerializer<T> createSerializer(ExecutionConfig executionConfig) {
	if (getTypeClass() == Tuple0.class) {
		return (TupleSerializer<T>) Tuple0Serializer.INSTANCE;
	}

	TypeSerializer<?>[] fieldSerializers = new TypeSerializer<?>[getArity()];
	for (int i = 0; i < types.length; i++) {
		fieldSerializers[i] = types[i].createSerializer(executionConfig);
	}
	
	Class<T> tupleClass = getTypeClass();
	
	return new TupleSerializer<T>(tupleClass, fieldSerializers);
}