Class FunctionCompiler

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

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

    • FunctionCompiler

      public FunctionCompiler(Configuration configuration)
  • Method Details

    • compile

      public <I, O> Function<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> Function<Iterable<I>,Iterable<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 <I, O> Function<I,Iterable<O>> compile(FlatMapDescriptor<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 <Type> BinaryOperator<Type> compile(ReduceDescriptor<Type> descriptor)
      Compile a reduction.
      Type Parameters:
      Type - input/output type of the transformation
      Parameters:
      descriptor - describes the transformation
      Returns:
      a compiled function
    • compile

      public <Type> Predicate<Type> compile(PredicateDescriptor<Type> predicateDescriptor)
    • getConfiguration

      public Configuration getConfiguration()