Examples of InvalidProgramException


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

   * is in fact a tuple type.
   */
  @Override
  public void setInputType(TypeInformation<?> type) {
    if (!type.isTupleType()) {
      throw new InvalidProgramException("The " + CsvOutputFormat.class.getSimpleName() +
        " can only be used to write tuple data sets.");
    }
  }
View Full Code Here

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

        new ProjectCrossFunction<I1, I2, OUT>(fields, isFromFirst, returnType.createSerializer().createInstance()), returnType);
    }

    @Override
    public CrossOperator<I1, I2, OUT> withConstantSetFirst(String... constantSetFirst) {
      throw new InvalidProgramException("The semantic properties (constant fields and forwarded fields) are automatically calculated.");
    }
View Full Code Here

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

      throw new InvalidProgramException("The semantic properties (constant fields and forwarded fields) are automatically calculated.");
    }

    @Override
    public CrossOperator<I1, I2, OUT> withConstantSetSecond(String... constantSetSecond) {
      throw new InvalidProgramException("The semantic properties (constant fields and forwarded fields) are automatically calculated.");
    }
View Full Code Here

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

        if (keys1 == null) {
          throw new NullPointerException();
        }

        if (keys1.isEmpty()) {
          throw new InvalidProgramException("The co-group keys must not be empty.");
        }

        this.keys1 = keys1;
      }
View Full Code Here

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

        if (keys2 == null) {
          throw new NullPointerException();
        }

        if (keys2.isEmpty()) {
          throw new InvalidProgramException("The co-group keys must not be empty.");
        }
        try {
          keys1.areCompatible(keys2);
        } catch(IncompatibleKeysException ike) {
          throw new InvalidProgramException("The pair of co-group keys are not compatible with each other.", ike);
        }

        return new CoGroupOperatorWithoutFunction(keys2);
      }
View Full Code Here

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

          if (keys2 == null) {
            throw new NullPointerException();
          }

          if (keys2.isEmpty()) {
            throw new InvalidProgramException("The co-group keys must not be empty.");
          }

          this.keys2 = keys2;
        }
View Full Code Here

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

    }

    // int-defined field
    public ExpressionKeys(int[] groupingFields, TypeInformation<T> type, boolean allowEmpty) {
      if (!type.isTupleType()) {
        throw new InvalidProgramException("Specifying keys via field positions is only valid" +
            "for tuple data types. Type: " + type);
      }

      if (!allowEmpty && (groupingFields == null || groupingFields.length == 0)) {
        throw new IllegalArgumentException("The grouping fields must not be empty.");
View Full Code Here

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

    if (set == null || keys == null) {
      throw new NullPointerException();
    }
   
    if (keys.isEmpty()) {
      throw new InvalidProgramException("The grouping keys must not be empty.");
    }

    this.dataSet = set;
    this.keys = keys;
  }
View Full Code Here

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

   */
  public SortedGrouping(DataSet<T> set, Keys<T> keys, int field, Order order) {
    super(set, keys);
   
    if (!dataSet.getType().isTupleType()) {
      throw new InvalidProgramException("Specifying order keys via field positions is only valid for tuple data types");
    }
    if (field >= dataSet.getType().getArity()) {
      throw new IllegalArgumentException("Order key out of tuple bounds.");
    }
    // use int-based expression key to properly resolve nested tuples for grouping
View Full Code Here

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

   */
  public SortedGrouping(DataSet<T> set, Keys<T> keys, String field, Order order) {
    super(set, keys);
   
    if (!(dataSet.getType() instanceof CompositeType)) {
      throw new InvalidProgramException("Specifying order keys via field positions is only valid for composite data types (pojo / tuple / case class)");
    }
    // resolve String-field to int using the expression keys
    ExpressionKeys<T> ek = new ExpressionKeys<T>(new String[]{field}, dataSet.getType());
    this.groupSortKeyPositions = ek.computeLogicalKeyPositions();
    this.groupSortOrders = new Order[groupSortKeyPositions.length];
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.