Package org.apache.flink.api.common.operators

Examples of org.apache.flink.api.common.operators.RecordOperator


    // check that we got the right types
    SingleInputOperator<?, ?, ?> contract = (SingleInputOperator<?, ?, ?>) node.getSingleInputNode().getPactContract();
    if (! (contract instanceof RecordOperator)) {
      throw new CompilerPostPassException("Error: Operator is not a Record based contract. Wrong compiler invokation.");
    }
    RecordOperator recContract = (RecordOperator) contract;
   
    // add the information to the schema
    int[] localPositions = contract.getKeyColumns(0);
    Class<? extends Key<?>>[] types = recContract.getKeyClasses();
    for (int i = 0; i < localPositions.length; i++) {
      schema.addType(localPositions[i], types[i]);
    }
   
    // this is a temporary fix, we should solve this more generic
View Full Code Here


    DualInputOperator<?, ?, ?, ?> contract = node.getTwoInputNode().getPactContract();
    if (! (contract instanceof RecordOperator)) {
      throw new CompilerPostPassException("Error: Operator is not a Pact Record based contract. Wrong compiler invokation.");
    }
   
    RecordOperator recContract = (RecordOperator) contract;
    int[] localPositions1 = contract.getKeyColumns(0);
    int[] localPositions2 = contract.getKeyColumns(1);
    Class<? extends Key<?>>[] types = recContract.getKeyClasses();
   
    if (localPositions1.length != localPositions2.length) {
      throw new CompilerException("Error: The keys for the first and second input have a different number of fields.");
    }
   
View Full Code Here

TOP

Related Classes of org.apache.flink.api.common.operators.RecordOperator

Copyright © 2018 www.massapicom. 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.