Package eu.stratosphere.compiler

Examples of eu.stratosphere.compiler.CompilerException


    Ordering prod2 = produced2.getOrdering();
   
    if (prod1 == null || prod2 == null || prod1.getNumberOfFields() < numRelevantFields ||
        prod2.getNumberOfFields() < prod2.getNumberOfFields())
    {
      throw new CompilerException("The given properties do not meet this operators requirements.");
    }
     
    for (int i = 0; i < numRelevantFields; i++) {
      if (prod1.getOrder(i) != prod2.getOrder(i)) {
        return false;
View Full Code Here


  @Override
  public DualInputPlanNode instantiate(Channel in1, Channel in2, TwoInputNode node) {
    boolean[] inputOrders = in1.getLocalProperties().getOrdering().getFieldSortDirections();
   
    if (inputOrders == null || inputOrders.length < this.keys1.size()) {
      throw new CompilerException("BUG: The input strategy does not sufficiently describe the sort orders for a CoGroup operator.");
    } else if (inputOrders.length > this.keys1.size()) {
      boolean[] tmp = new boolean[this.keys1.size()];
      System.arraycopy(inputOrders, 0, tmp, 0, tmp.length);
      inputOrders = tmp;
    }
View Full Code Here

  public WorksetIterationNode(DeltaIterationBase<?, ?> iteration) {
    super(iteration);
   
    final int[] ssKeys = iteration.getSolutionSetKeyFields();
    if (ssKeys == null || ssKeys.length == 0) {
      throw new CompilerException("Invalid WorksetIteration: No key fields defined for the solution set.");
    }
    this.solutionSetKeyFields = new FieldList(ssKeys);
    this.partitionedProperties = new GlobalProperties();
    this.partitionedProperties.setHashPartitioned(this.solutionSetKeyFields);
   
View Full Code Here

      GlobalProperties gp = candidate.getGlobalProperties();
     
      if (gp.getPartitioning() != PartitioningProperty.HASH_PARTITIONED || gp.getPartitioningFields() == null ||
          !gp.getPartitioningFields().equals(this.solutionSetKeyFields))
      {
        throw new CompilerException("Bug: The solution set delta is not partitioned.");
      }
    }
   
    // 5) Create a candidate for the Iteration Node for every remaining plan of the step function.
   
    final GlobalProperties gp = new GlobalProperties();
    gp.setHashPartitioned(this.solutionSetKeyFields);
    gp.addUniqueFieldCombination(this.solutionSetKeyFields);
   
    final LocalProperties lp = new LocalProperties();
    lp.addUniqueFields(this.solutionSetKeyFields);
   
    // take all combinations of solution set delta and workset plans
    for (PlanNode solutionSetCandidate : solutionSetDeltaCandidates) {
      for (PlanNode worksetCandidate : worksetCandidates) {
        // check whether they have the same operator at their latest branching point
        if (this.singleRoot.areBranchCompatible(solutionSetCandidate, worksetCandidate)) {
         
          SingleInputPlanNode siSolutionDeltaCandidate = (SingleInputPlanNode) solutionSetCandidate;
          boolean immediateDeltaUpdate;
         
          // check whether we need a dedicated solution set delta operator, or whether we can update on the fly
          if (siSolutionDeltaCandidate.getInput().getShipStrategy() == ShipStrategyType.FORWARD && this.solutionDeltaImmediatelyAfterSolutionJoin) {
            // we do not need this extra node. we can make the predecessor the delta
            // sanity check the node and connection
            if (siSolutionDeltaCandidate.getDriverStrategy() != DriverStrategy.UNARY_NO_OP || siSolutionDeltaCandidate.getInput().getLocalStrategy() != LocalStrategy.NONE) {
              throw new CompilerException("Invalid Solution set delta node.");
            }
           
            solutionSetCandidate = siSolutionDeltaCandidate.getInput().getSource();
            immediateDeltaUpdate = true;
          } else {
View Full Code Here

    List<UnclosedBranchDescriptor> pred2branches = getSecondPredecessorNode().openBranches;
   
    // if the predecessors do not have branches, then we have multiple sinks that do not originate from
    // a common data flow.
    if (pred1branches == null || pred1branches.isEmpty() || pred2branches == null || pred2branches.isEmpty()) {
      throw new CompilerException("The given program contains multiple disconnected data flows.");
    }
   
    // copy the lists and merge
    List<UnclosedBranchDescriptor> result1 = new ArrayList<UnclosedBranchDescriptor>(pred1branches);
    List<UnclosedBranchDescriptor> result2 = new ArrayList<UnclosedBranchDescriptor>(pred2branches);
View Full Code Here

            .branchPlan != null){
          selectedCandidate = getNextWorkSetPlanNode().branchPlan.get(brancher);
        }

        if (selectedCandidate == null) {
          throw new CompilerException(
              "Candidates for a node with open branches are missing information about the selected candidate ");
        }

        this.branchPlan.put(brancher, selectedCandidate);
      }
View Full Code Here

    Ordering prod2 = produced2.getOrdering();
   
    if (prod1 == null || prod2 == null || prod1.getNumberOfFields() < numRelevantFields ||
        prod2.getNumberOfFields() < prod2.getNumberOfFields())
    {
      throw new CompilerException("The given properties do not meet this operators requirements.");
    }
     
    for (int i = 0; i < numRelevantFields; i++) {
      if (prod1.getOrder(i) != prod2.getOrder(i)) {
        return false;
View Full Code Here

        if(rootOfStepFunction.branchPlan != null){
          selectedCandidate = rootOfStepFunction.branchPlan.get(brancher);
        }

        if (selectedCandidate == null) {
          throw new CompilerException(
              "Candidates for a node with open branches are missing information about the selected candidate ");
        }

        this.branchPlan.put(brancher, selectedCandidate);
      }
View Full Code Here

  @Override
  public DualInputPlanNode instantiate(Channel in1, Channel in2, TwoInputNode node) {
    boolean[] inputOrders = in1.getLocalProperties().getOrdering().getFieldSortDirections();
   
    if (inputOrders == null || inputOrders.length < this.keys1.size()) {
      throw new CompilerException("BUG: The input strategy does not sufficiently describe the sort orders for a merge operator.");
    } else if (inputOrders.length > this.keys1.size()) {
      boolean[] tmp = new boolean[this.keys1.size()];
      System.arraycopy(inputOrders, 0, tmp, 0, tmp.length);
      inputOrders = tmp;
    }
View Full Code Here

    } else if (dirs.length > numFields) {
      final boolean[] subSet = new boolean[numFields];
      System.arraycopy(dirs, 0, subSet, 0, numFields);
      return subSet;
    } else {
      throw new CompilerException();
    }
  }
View Full Code Here

TOP

Related Classes of eu.stratosphere.compiler.CompilerException

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.