Package org.apache.flink.api.common.functions

Examples of org.apache.flink.api.common.functions.RichFunction.open()


public class FunctionUtils {

  public static void openFunction (Function function, Configuration parameters) throws Exception{
    if (function instanceof RichFunction) {
      RichFunction richFunction = (RichFunction) function;
      richFunction.open (parameters);
    }
  }

  public static void closeFunction (Function function) throws Exception{
    if (function instanceof RichFunction) {
View Full Code Here


     
      RichFunction reducer = (RichFunction) reduceOp.getUserCodeWrapper().getUserCodeObject();
     
      // test the method invocations
      reducer.close();
      reducer.open(new Configuration());
      assertEquals(2, methodCounter.get());
     
      // prepare the reduce / combine tests
      final List<Record> target = new ArrayList<Record>();
      Collector<Record> collector = new Collector<Record>() {
View Full Code Here

     
      RichFunction cogrouper = (RichFunction) coGroupOp.getUserCodeWrapper().getUserCodeObject();
     
      // test the method invocations
      cogrouper.close();
      cogrouper.open(new Configuration());
      assertEquals(2, methodCounter.get());
     
      // prepare the coGroup
      final List<Record> target = new ArrayList<Record>();
      Collector<Record> collector = new Collector<Record>() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.