Package org.apache.wayang.flink.compiler
Class FunctionCompiler
- java.lang.Object
-
- org.apache.wayang.flink.compiler.FunctionCompiler
-
public class FunctionCompiler extends java.lang.Object
A compiler translates Wayang functions into executable Flink functions.
-
-
Constructor Summary
Constructors Constructor Description FunctionCompiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <I,O>
org.apache.flink.api.common.functions.RichFlatMapFunction<I,O>compile(FunctionDescriptor.ExtendedSerializableFunction<I,java.lang.Iterable<O>> flatMapDescriptor, FlinkExecutionContext exe)
<T> org.apache.flink.api.common.io.OutputFormat<T>
compile(FunctionDescriptor.SerializableConsumer<T> consumerDescriptor)
<I,O>
org.apache.flink.api.common.functions.FlatMapFunction<I,O>compile(FunctionDescriptor.SerializableFunction<I,java.lang.Iterable<O>> flatMapDescriptor)
Compile a transformation.<T> org.apache.flink.api.common.functions.FilterFunction<T>
compile(FunctionDescriptor.SerializablePredicate<T> predicateDescriptor)
<I,O>
org.apache.flink.api.common.functions.MapPartitionFunction<I,O>compile(MapPartitionsDescriptor<I,O> descriptor)
Compile a partition transformation.<I,O>
org.apache.flink.api.common.functions.RichMapPartitionFunction<I,O>compile(MapPartitionsDescriptor<I,O> descriptor, FlinkExecutionContext fex)
<T> WayangConvergenceCriterion
compile(PredicateDescriptor<java.util.Collection<T>> descriptor)
<T> org.apache.flink.api.common.functions.ReduceFunction<T>
compile(ReduceDescriptor<T> descriptor)
Compile a reduction.<I,O>
org.apache.flink.api.common.functions.MapFunction<I,O>compile(TransformationDescriptor<I,O> descriptor)
Compile a transformation.<I,O>
org.apache.flink.api.common.functions.RichMapFunction<I,O>compile(TransformationDescriptor<I,O> mapDescriptor, FlinkExecutionContext fex)
<T0,T1,O>
org.apache.flink.api.common.functions.CoGroupFunction<T0,T1,O>compileCoGroup()
<T,K>
org.apache.flink.api.java.functions.KeySelector<T,K>compileKeySelector(TransformationDescriptor<T,K> descriptor)
<T> org.apache.flink.api.java.io.TextOutputFormat.TextFormatter<T>
compileOutput(TransformationDescriptor<T,java.lang.String> formattingDescriptor)
-
-
-
Method Detail
-
compile
public <I,O> org.apache.flink.api.common.functions.MapFunction<I,O> compile(TransformationDescriptor<I,O> descriptor)
Compile a transformation.- Type Parameters:
I
- input type of the transformationO
- output type of the transformation- Parameters:
descriptor
- describes the transformation- Returns:
- a compiled function
-
compile
public <I,O> org.apache.flink.api.common.functions.FlatMapFunction<I,O> compile(FunctionDescriptor.SerializableFunction<I,java.lang.Iterable<O>> flatMapDescriptor)
Compile a transformation.- Type Parameters:
I
- input type of the transformationO
- output type of the transformation- Parameters:
flatMapDescriptor
- describes the transformation- Returns:
- a compiled function
-
compile
public <T> org.apache.flink.api.common.functions.ReduceFunction<T> compile(ReduceDescriptor<T> descriptor)
Compile a reduction.- Type Parameters:
T
- input/output type of the transformation- Parameters:
descriptor
- describes the transformation- Returns:
- a compiled function
-
compile
public <T> org.apache.flink.api.common.functions.FilterFunction<T> compile(FunctionDescriptor.SerializablePredicate<T> predicateDescriptor)
-
compile
public <T> org.apache.flink.api.common.io.OutputFormat<T> compile(FunctionDescriptor.SerializableConsumer<T> consumerDescriptor)
-
compileKeySelector
public <T,K> org.apache.flink.api.java.functions.KeySelector<T,K> compileKeySelector(TransformationDescriptor<T,K> descriptor)
-
compileCoGroup
public <T0,T1,O> org.apache.flink.api.common.functions.CoGroupFunction<T0,T1,O> compileCoGroup()
-
compileOutput
public <T> org.apache.flink.api.java.io.TextOutputFormat.TextFormatter<T> compileOutput(TransformationDescriptor<T,java.lang.String> formattingDescriptor)
-
compile
public <I,O> org.apache.flink.api.common.functions.MapPartitionFunction<I,O> compile(MapPartitionsDescriptor<I,O> descriptor)
Compile a partition transformation.- Type Parameters:
I
- input type of the transformationO
- output type of the transformation- Parameters:
descriptor
- describes the transformation- Returns:
- a compiled function
-
compile
public <T> WayangConvergenceCriterion compile(PredicateDescriptor<java.util.Collection<T>> descriptor)
-
compile
public <I,O> org.apache.flink.api.common.functions.RichFlatMapFunction<I,O> compile(FunctionDescriptor.ExtendedSerializableFunction<I,java.lang.Iterable<O>> flatMapDescriptor, FlinkExecutionContext exe)
-
compile
public <I,O> org.apache.flink.api.common.functions.RichMapFunction<I,O> compile(TransformationDescriptor<I,O> mapDescriptor, FlinkExecutionContext fex)
-
compile
public <I,O> org.apache.flink.api.common.functions.RichMapPartitionFunction<I,O> compile(MapPartitionsDescriptor<I,O> descriptor, FlinkExecutionContext fex)
-
-