Class FunctionCompiler

java.lang.Object
org.apache.wayang.flink.compiler.FunctionCompiler

public class FunctionCompiler extends Object
A compiler translates Wayang functions into executable Flink functions.
  • Constructor Details

    • FunctionCompiler

      public FunctionCompiler()
  • Method Details

    • 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 transformation
      O - 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,Iterable<O>> flatMapDescriptor)
      Compile a transformation.
      Type Parameters:
      I - input type of the transformation
      O - 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,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 transformation
      O - output type of the transformation
      Parameters:
      descriptor - describes the transformation
      Returns:
      a compiled function
    • compile

      public <T> WayangConvergenceCriterion compile(PredicateDescriptor<Collection<T>> descriptor)
    • compile

      public <I, O> org.apache.flink.api.common.functions.RichFlatMapFunction<I,O> compile(FunctionDescriptor.ExtendedSerializableFunction<I,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)