Package org.apache.flink.api.common

Examples of org.apache.flink.api.common.InvalidProgramException


    return result;
  }

  private <T> TypeComparator<T> getTypeComparator(TypeInformation<T> inputType, int[] inputKeys, boolean[] inputSortDirections) {
    if (!(inputType instanceof CompositeType)) {
      throw new InvalidProgramException("Input types of coGroup must be composite types.");
    }

    return ((CompositeType<T>) inputType).createComparator(inputKeys, inputSortDirections, 0);
  }
View Full Code Here


    TypeInformation<T> inputType = operatorInfo.getInputType();

    int[] inputColumns = getKeyColumns(0);

    if (!(inputType instanceof CompositeType) && inputColumns.length > 0) {
      throw new InvalidProgramException("Grouping is only possible on composite types.");
    }

    FunctionUtils.setFunctionRuntimeContext(function, ctx);
    FunctionUtils.openFunction(function, this.parameters);
View Full Code Here

  // --------------------------------------------------------------------------------------------
 
  public LocalExecutor() {
    if (!ExecutionEnvironment.localExecutionIsAllowed()) {
      throw new InvalidProgramException("The LocalEnvironment cannot be used when submitting a program through a client.");
    }
  }
View Full Code Here

  public void validate() throws InvalidProgramException {
    if (this.input == null) {
      throw new RuntimeException("Operator for initial partial solution is not set.");
    }
    if (this.iterationResult == null) {
      throw new InvalidProgramException("Operator producing the next version of the partial " +
          "solution (iteration result) is not set.");
    }
    if (this.terminationCriterion == null && this.numberOfIterations <= 0) {
      throw new InvalidProgramException("No termination condition is set " +
          "(neither fix number of iteration nor termination criterion).");
    }
  }
View Full Code Here

    while (!remaining.isEmpty()) {
     
      // first check if we have more candidates to start traversing from. if not, then the
      // graph is cyclic, which is not permitted
      if (startNodePos >= sorted.size()) {
        throw new InvalidProgramException("The job graph is cyclic.");
      }
     
      AbstractJobVertex current = sorted.get(startNodePos++);
      addNodesThatHaveNoNewPredecessors(current, sorted, remaining);
    }
View Full Code Here

    TypeInformation<IN> inputType = operatorInfo.getInputType();

    int[] keyColumns = getKeyColumns(0);

    if (!(inputType instanceof CompositeType) && (keyColumns.length > 0 || groupOrder != null)) {
      throw new InvalidProgramException("Grouping or group-sorting is only possible on composite type.");
    }

    int[] sortColumns = keyColumns;
    boolean[] sortOrderings = new boolean[sortColumns.length];
View Full Code Here

TOP

Related Classes of org.apache.flink.api.common.InvalidProgramException

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.