Package org.apache.flink.python.util
Enum ProtoUtils
- java.lang.Object
-
- java.lang.Enum<ProtoUtils>
-
- org.apache.flink.python.util.ProtoUtils
-
- All Implemented Interfaces:
Serializable
,Comparable<ProtoUtils>
@Internal public enum ProtoUtils extends Enum<ProtoUtils>
Utilities used to construct protobuf objects or construct objects from protobuf objects.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FlinkFnApi.CoderInfoDescriptor
createArrowTypeCoderInfoDescriptorProto(RowType rowType, FlinkFnApi.CoderInfoDescriptor.Mode mode, boolean separatedWithEndMessage)
static org.apache.beam.model.pipeline.v1.RunnerApi.Coder
createCoderProto(FlinkFnApi.CoderInfoDescriptor coderInfoDescriptor)
static FlinkFnApi.CoderInfoDescriptor
createFlattenRowTypeCoderInfoDescriptorProto(RowType rowType, FlinkFnApi.CoderInfoDescriptor.Mode mode, boolean separatedWithEndMessage)
static FlinkFnApi.CoderInfoDescriptor
createOverWindowArrowTypeCoderInfoDescriptorProto(RowType rowType, FlinkFnApi.CoderInfoDescriptor.Mode mode, boolean separatedWithEndMessage)
static FlinkFnApi.CoderInfoDescriptor
createRawTypeCoderInfoDescriptorProto(TypeInformation<?> typeInformation, FlinkFnApi.CoderInfoDescriptor.Mode mode, boolean separatedWithEndMessage, ClassLoader userCodeClassLoader)
static FlinkFnApi.UserDefinedDataStreamFunction
createReviseOutputDataStreamFunctionProto()
static FlinkFnApi.CoderInfoDescriptor
createRowTypeCoderInfoDescriptorProto(RowType rowType, FlinkFnApi.CoderInfoDescriptor.Mode mode, boolean separatedWithEndMessage)
static FlinkFnApi.UserDefinedAggregateFunction
createUserDefinedAggregateFunctionProto(PythonAggregateFunctionInfo pythonFunctionInfo, DataViewSpec[] dataViewSpecs)
static FlinkFnApi.UserDefinedDataStreamFunction
createUserDefinedDataStreamFunctionProto(DataStreamPythonFunctionInfo dataStreamPythonFunctionInfo, RuntimeContext runtimeContext, Map<String,String> internalParameters, boolean inBatchExecutionMode, boolean isMetricEnabled, boolean isProfileEnabled, boolean hasSideOutput, int stateCacheSize, int mapStateReadCacheSize, int mapStateWriteCacheSize)
static List<FlinkFnApi.UserDefinedDataStreamFunction>
createUserDefinedDataStreamFunctionProtos(DataStreamPythonFunctionInfo dataStreamPythonFunctionInfo, RuntimeContext runtimeContext, Map<String,String> internalParameters, boolean inBatchExecutionMode, boolean isMetricEnabled, boolean isProfileEnabled, boolean hasSideOutput, int stateCacheSize, int mapStateReadCacheSize, int mapStateWriteCacheSize)
static List<FlinkFnApi.UserDefinedDataStreamFunction>
createUserDefinedDataStreamStatefulFunctionProtos(DataStreamPythonFunctionInfo dataStreamPythonFunctionInfo, RuntimeContext runtimeContext, Map<String,String> internalParameters, TypeInformation<?> keyTypeInfo, boolean inBatchExecutionMode, boolean isMetricEnabled, boolean isProfileEnabled, boolean hasSideOutput, int stateCacheSize, int mapStateReadCacheSize, int mapStateWriteCacheSize)
static FlinkFnApi.UserDefinedFunction
createUserDefinedFunctionProto(PythonFunctionInfo pythonFunctionInfo)
static FlinkFnApi.UserDefinedFunctions
createUserDefinedFunctionsProto(RuntimeContext runtimeContext, PythonFunctionInfo[] userDefinedFunctions, boolean isMetricEnabled, boolean isProfileEnabled)
static StateTtlConfig
parseStateTtlConfigFromProto(FlinkFnApi.StateDescriptor.StateTTLConfig stateTTLConfigProto)
static ProtoUtils
valueOf(String name)
Returns the enum constant of this type with the specified name.static ProtoUtils[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static ProtoUtils[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ProtoUtils c : ProtoUtils.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ProtoUtils valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
createCoderProto
public static org.apache.beam.model.pipeline.v1.RunnerApi.Coder createCoderProto(FlinkFnApi.CoderInfoDescriptor coderInfoDescriptor)
-
createRowTypeCoderInfoDescriptorProto
public static FlinkFnApi.CoderInfoDescriptor createRowTypeCoderInfoDescriptorProto(RowType rowType, FlinkFnApi.CoderInfoDescriptor.Mode mode, boolean separatedWithEndMessage)
-
createFlattenRowTypeCoderInfoDescriptorProto
public static FlinkFnApi.CoderInfoDescriptor createFlattenRowTypeCoderInfoDescriptorProto(RowType rowType, FlinkFnApi.CoderInfoDescriptor.Mode mode, boolean separatedWithEndMessage)
-
createArrowTypeCoderInfoDescriptorProto
public static FlinkFnApi.CoderInfoDescriptor createArrowTypeCoderInfoDescriptorProto(RowType rowType, FlinkFnApi.CoderInfoDescriptor.Mode mode, boolean separatedWithEndMessage)
-
createOverWindowArrowTypeCoderInfoDescriptorProto
public static FlinkFnApi.CoderInfoDescriptor createOverWindowArrowTypeCoderInfoDescriptorProto(RowType rowType, FlinkFnApi.CoderInfoDescriptor.Mode mode, boolean separatedWithEndMessage)
-
createUserDefinedFunctionsProto
public static FlinkFnApi.UserDefinedFunctions createUserDefinedFunctionsProto(RuntimeContext runtimeContext, PythonFunctionInfo[] userDefinedFunctions, boolean isMetricEnabled, boolean isProfileEnabled)
-
createUserDefinedFunctionProto
public static FlinkFnApi.UserDefinedFunction createUserDefinedFunctionProto(PythonFunctionInfo pythonFunctionInfo)
-
createUserDefinedAggregateFunctionProto
public static FlinkFnApi.UserDefinedAggregateFunction createUserDefinedAggregateFunctionProto(PythonAggregateFunctionInfo pythonFunctionInfo, DataViewSpec[] dataViewSpecs)
-
createUserDefinedDataStreamFunctionProto
public static FlinkFnApi.UserDefinedDataStreamFunction createUserDefinedDataStreamFunctionProto(DataStreamPythonFunctionInfo dataStreamPythonFunctionInfo, RuntimeContext runtimeContext, Map<String,String> internalParameters, boolean inBatchExecutionMode, boolean isMetricEnabled, boolean isProfileEnabled, boolean hasSideOutput, int stateCacheSize, int mapStateReadCacheSize, int mapStateWriteCacheSize)
-
createReviseOutputDataStreamFunctionProto
public static FlinkFnApi.UserDefinedDataStreamFunction createReviseOutputDataStreamFunctionProto()
-
createUserDefinedDataStreamFunctionProtos
public static List<FlinkFnApi.UserDefinedDataStreamFunction> createUserDefinedDataStreamFunctionProtos(DataStreamPythonFunctionInfo dataStreamPythonFunctionInfo, RuntimeContext runtimeContext, Map<String,String> internalParameters, boolean inBatchExecutionMode, boolean isMetricEnabled, boolean isProfileEnabled, boolean hasSideOutput, int stateCacheSize, int mapStateReadCacheSize, int mapStateWriteCacheSize)
-
createUserDefinedDataStreamStatefulFunctionProtos
public static List<FlinkFnApi.UserDefinedDataStreamFunction> createUserDefinedDataStreamStatefulFunctionProtos(DataStreamPythonFunctionInfo dataStreamPythonFunctionInfo, RuntimeContext runtimeContext, Map<String,String> internalParameters, TypeInformation<?> keyTypeInfo, boolean inBatchExecutionMode, boolean isMetricEnabled, boolean isProfileEnabled, boolean hasSideOutput, int stateCacheSize, int mapStateReadCacheSize, int mapStateWriteCacheSize)
-
createRawTypeCoderInfoDescriptorProto
public static FlinkFnApi.CoderInfoDescriptor createRawTypeCoderInfoDescriptorProto(TypeInformation<?> typeInformation, FlinkFnApi.CoderInfoDescriptor.Mode mode, boolean separatedWithEndMessage, ClassLoader userCodeClassLoader)
-
parseStateTtlConfigFromProto
public static StateTtlConfig parseStateTtlConfigFromProto(FlinkFnApi.StateDescriptor.StateTTLConfig stateTTLConfigProto)
-
-