Java Code Examples for org.apache.flink.api.java.typeutils.MissingTypeInfo#getTypeException()

The following examples show how to use org.apache.flink.api.java.typeutils.MissingTypeInfo#getTypeException() . 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 File: StreamTransformation.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
/**
 * Returns the output type of this {@code StreamTransformation} as a {@link TypeInformation}. Once
 * this is used once the output type cannot be changed anymore using {@link #setOutputType}.
 *
 * @return The output type of this {@code StreamTransformation}
 */
public TypeInformation<T> getOutputType() {
	if (outputType instanceof MissingTypeInfo) {
		MissingTypeInfo typeInfo = (MissingTypeInfo) this.outputType;
		throw new InvalidTypesException(
				"The return type of function '"
						+ typeInfo.getFunctionName()
						+ "' could not be determined automatically, due to type erasure. "
						+ "You can give type information hints by using the returns(...) "
						+ "method on the result of the transformation call, or by letting "
						+ "your function implement the 'ResultTypeQueryable' "
						+ "interface.", typeInfo.getTypeException());
	}
	typeUsed = true;
	return this.outputType;
}
 
Example 2
Source File: Transformation.java    From flink with Apache License 2.0 6 votes vote down vote up
/**
 * Returns the output type of this {@code Transformation} as a {@link TypeInformation}. Once
 * this is used once the output type cannot be changed anymore using {@link #setOutputType}.
 *
 * @return The output type of this {@code Transformation}
 */
public TypeInformation<T> getOutputType() {
	if (outputType instanceof MissingTypeInfo) {
		MissingTypeInfo typeInfo = (MissingTypeInfo) this.outputType;
		throw new InvalidTypesException(
				"The return type of function '"
						+ typeInfo.getFunctionName()
						+ "' could not be determined automatically, due to type erasure. "
						+ "You can give type information hints by using the returns(...) "
						+ "method on the result of the transformation call, or by letting "
						+ "your function implement the 'ResultTypeQueryable' "
						+ "interface.", typeInfo.getTypeException());
	}
	typeUsed = true;
	return this.outputType;
}
 
Example 3
Source File: Transformation.java    From flink with Apache License 2.0 6 votes vote down vote up
/**
 * Returns the output type of this {@code Transformation} as a {@link TypeInformation}. Once
 * this is used once the output type cannot be changed anymore using {@link #setOutputType}.
 *
 * @return The output type of this {@code Transformation}
 */
public TypeInformation<T> getOutputType() {
	if (outputType instanceof MissingTypeInfo) {
		MissingTypeInfo typeInfo = (MissingTypeInfo) this.outputType;
		throw new InvalidTypesException(
				"The return type of function '"
						+ typeInfo.getFunctionName()
						+ "' could not be determined automatically, due to type erasure. "
						+ "You can give type information hints by using the returns(...) "
						+ "method on the result of the transformation call, or by letting "
						+ "your function implement the 'ResultTypeQueryable' "
						+ "interface.", typeInfo.getTypeException());
	}
	typeUsed = true;
	return this.outputType;
}
 
Example 4
Source File: DataSet.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the {@link TypeInformation} for the type of this DataSet.
 *
 * @return The TypeInformation for the type of this DataSet.
 *
 * @see TypeInformation
 */
public TypeInformation<T> getType() {
	if (type instanceof MissingTypeInfo) {
		MissingTypeInfo typeInfo = (MissingTypeInfo) type;
		throw new InvalidTypesException("The return type of function '" + typeInfo.getFunctionName()
				+ "' could not be determined automatically, due to type erasure. "
				+ "You can give type information hints by using the returns(...) method on the result of "
				+ "the transformation call, or by letting your function implement the 'ResultTypeQueryable' "
				+ "interface.", typeInfo.getTypeException());
	}
	typeUsed = true;
	return this.type;
}
 
Example 5
Source File: DataSet.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the {@link TypeInformation} for the type of this DataSet.
 *
 * @return The TypeInformation for the type of this DataSet.
 *
 * @see TypeInformation
 */
public TypeInformation<T> getType() {
	if (type instanceof MissingTypeInfo) {
		MissingTypeInfo typeInfo = (MissingTypeInfo) type;
		throw new InvalidTypesException("The return type of function '" + typeInfo.getFunctionName()
				+ "' could not be determined automatically, due to type erasure. "
				+ "You can give type information hints by using the returns(...) method on the result of "
				+ "the transformation call, or by letting your function implement the 'ResultTypeQueryable' "
				+ "interface.", typeInfo.getTypeException());
	}
	typeUsed = true;
	return this.type;
}
 
Example 6
Source File: DataSet.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the {@link TypeInformation} for the type of this DataSet.
 *
 * @return The TypeInformation for the type of this DataSet.
 *
 * @see TypeInformation
 */
public TypeInformation<T> getType() {
	if (type instanceof MissingTypeInfo) {
		MissingTypeInfo typeInfo = (MissingTypeInfo) type;
		throw new InvalidTypesException("The return type of function '" + typeInfo.getFunctionName()
				+ "' could not be determined automatically, due to type erasure. "
				+ "You can give type information hints by using the returns(...) method on the result of "
				+ "the transformation call, or by letting your function implement the 'ResultTypeQueryable' "
				+ "interface.", typeInfo.getTypeException());
	}
	typeUsed = true;
	return this.type;
}