Class FunctionCompiler


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

      • FunctionCompiler

        public FunctionCompiler​(Configuration configuration)
    • Method Detail

      • compile

        public <I,​O> java.util.function.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> java.util.function.Function<java.lang.Iterable<I>,​java.lang.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> java.util.function.Function<I,​java.lang.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> java.util.function.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> java.util.function.Predicate<Type> compile​(PredicateDescriptor<Type> predicateDescriptor)