Package eu.stratosphere.compiler

Examples of eu.stratosphere.compiler.CompilerException


    for (Iterator<PlanNode> preds = getPredecessors(); preds.hasNext();) {
      Costs parentCosts = preds.next().getCumulativeCostsShare();
      if (parentCosts != null) {
        this.cumulativeCosts.addCosts(parentCosts);
      } else {
        throw new CompilerException("Trying to set the costs of an operator before the predecessor costs are computed.");
      }
    }
   
    // add all broadcast variable inputs
    if (this.broadcastInputs != null) {
      for (NamedChannel nc : this.broadcastInputs) {
        Costs bcInputCost = nc.getSource().getCumulativeCostsShare();
        if (bcInputCost != null) {
          this.cumulativeCosts.addCosts(bcInputCost);
        } else {
          throw new CompilerException("Trying to set the costs of an operator before the broadcast input costs are computed.");
        }
      }
    }
  }
View Full Code Here


    }
   
    // do a sanity check that if we are branching, we have now candidates for each branch point
    if (this.template.hasUnclosedBranches()) {
      if (this.branchPlan == null) {
        throw new CompilerException("Branching and rejoining logic did not find a candidate for the branching point.");
      }
 
      for (UnclosedBranchDescriptor uc : this.template.getOpenBranches()) {
        OptimizerNode brancher = uc.getBranchingNode();
        if (this.branchPlan.get(brancher) == null) {
          throw new CompilerException("Branching and rejoining logic did not find a candidate for the branching point.");
        }
      }
    }
  }
View Full Code Here

    if (in1 instanceof SinkPlanNode) {
      sinks.add((SinkPlanNode) in1);
    } else if (in1 instanceof SinkJoinerPlanNode) {
      ((SinkJoinerPlanNode) in1).getDataSinks(sinks);
    } else {
      throw new CompilerException("Illegal child node for a sink joiner utility node: Neither Sink nor Sink Joiner");
    }
   
    if (in2 instanceof SinkPlanNode) {
      sinks.add((SinkPlanNode) in2);
    } else if (in2 instanceof SinkJoinerPlanNode) {
      ((SinkJoinerPlanNode) in2).getDataSinks(sinks);
    } else {
      throw new CompilerException("Illegal child node for a sink joiner utility node: Neither Sink nor Sink Joiner");
    }
  }
View Full Code Here

          } else {
            this.globalProps.reset();
          }
          break;
        case NONE:
          throw new CompilerException("Cannot produce GlobalProperties before ship strategy is set.");
      }
    }
   
    return this.globalProps;
  }
View Full Code Here

        case SORT:
        case COMBININGSORT:
          this.localProps.setOrdering(Utils.createOrdering(this.localKeys, this.localSortOrder));
          break;
        default:
          throw new CompilerException("Unsupported local strategy for channel.");
      }
    }
   
    return this.localProps;
  }
View Full Code Here

          break;
        case PARTITION_LOCAL_HASH:
        case FORWARD:
          break;
        case NONE:
          throw new CompilerException("ShipStrategy has not yet been set.");
      }
      return props;
    }
  }
View Full Code Here

   
    // some strategies globally reestablish properties
    switch (this.shipStrategy) {
    case FORWARD:
    case PARTITION_LOCAL_HASH:
      throw new CompilerException("Cannot use FORWARD or LOCAL_HASH strategy between operations " +
          "with different number of parallel instances.");
    case NONE: // excluded by sanity check. lust here for verification check completion
    case BROADCAST:
    case PARTITION_HASH:
    case PARTITION_RANGE:
    case PARTITION_RANDOM:
      return;
    }
    throw new CompilerException("Unrecognized Ship Strategy Type: " + this.shipStrategy);
  }
View Full Code Here

    case PARTITION_RANGE:
    case PARTITION_RANDOM:
      return;
    }
   
    throw new CompilerException("Unrecognized Ship Strategy Type: " + this.shipStrategy);
  }
View Full Code Here

      } else if (PactCompiler.HINT_LOCAL_STRATEGY_HASH_BUILD_FIRST.equals(localStrategy)) {
        fixedDriverStrat = new HashJoinBuildFirstProperties(this.keys1, this.keys2);
      } else if (PactCompiler.HINT_LOCAL_STRATEGY_HASH_BUILD_SECOND.equals(localStrategy)) {
        fixedDriverStrat = new HashJoinBuildSecondProperties(this.keys1, this.keys2);
      } else {
        throw new CompilerException("Invalid local strategy hint for match contract: " + localStrategy);
      }
      ArrayList<OperatorDescriptorDual> list = new ArrayList<OperatorDescriptorDual>();
      list.add(fixedDriverStrat);
      return list;
    } else {
View Full Code Here

   */
  public BulkIterationNode(BulkIterationBase<?> iteration) {
    super(iteration);
   
    if (iteration.getMaximumNumberOfIterations() <= 0) {
      throw new CompilerException("BulkIteration must have a maximum number of iterations specified.");
    }
   
    int numIters = iteration.getMaximumNumberOfIterations();
   
    this.costWeight = (numIters > 0 && numIters < OptimizerNode.MAX_DYNAMIC_PATH_COST_WEIGHT) ?
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.