Package org.apache.wayang.java.compiler
Class FunctionCompiler
- java.lang.Object
-
- org.apache.wayang.java.compiler.FunctionCompiler
-
public class FunctionCompiler extends java.lang.Object
A compiler translates Wayang functions into executable Java functions.
-
-
Constructor Summary
Constructors Constructor Description FunctionCompiler(Configuration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <I,O>
java.util.function.Function<I,java.lang.Iterable<O>>compile(FlatMapDescriptor<I,O> descriptor)
Compile a transformation.<I,O>
java.util.function.Function<java.lang.Iterable<I>,java.lang.Iterable<O>>compile(MapPartitionsDescriptor<I,O> descriptor)
Compile a partition transformation.<Type> java.util.function.Predicate<Type>
compile(PredicateDescriptor<Type> predicateDescriptor)
<Type> java.util.function.BinaryOperator<Type>
compile(ReduceDescriptor<Type> descriptor)
Compile a reduction.<I,O>
java.util.function.Function<I,O>compile(TransformationDescriptor<I,O> descriptor)
Compile a transformation.Configuration
getConfiguration()
-
-
-
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 transformationO
- 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 transformationO
- 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 transformationO
- 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)
-
getConfiguration
public Configuration getConfiguration()
-
-