Package eu.stratosphere.compiler.dataproperties

Examples of eu.stratosphere.compiler.dataproperties.LocalProperties


  public NAryUnionPlanNode(BinaryUnionNode template, List<Channel> inputs, GlobalProperties gProps) {
    super(template, "Union", DriverStrategy.NONE);
   
    this.inputs = inputs;
    this.globalProps = gProps;
    this.localProps = new LocalProperties();
  }
View Full Code Here


   */
  public SourcePlanNode(DataSourceNode template, String nodeName) {
    super(template, nodeName, DriverStrategy.NONE);
   
    this.globalProps = new GlobalProperties();
    this.localProps = new LocalProperties();
    updatePropertiesWithUniqueSets(template.getUniqueFields());
  }
View Full Code Here

 
  public LocalProperties getLocalPropertiesAfterShippingOnly() {
    if (this.shipStrategy == ShipStrategyType.FORWARD) {
      return this.source.getLocalProperties();
    } else {
      final LocalProperties props = this.source.getLocalProperties().clone();
      switch (this.shipStrategy) {
        case BROADCAST:
        case PARTITION_HASH:
        case PARTITION_RANGE:
        case PARTITION_RANDOM:
          props.reset();
          break;
        case PARTITION_LOCAL_HASH:
        case FORWARD:
          break;
        case NONE:
View Full Code Here

    // 5) Create a candidate for the Iteration Node for every remaining plan of the step function.
    if (terminationCriterion == null) {
      for (PlanNode candidate : candidates) {
        BulkIterationPlanNode node = new BulkIterationPlanNode(this, "BulkIteration ("+this.getPactContract().getName()+")", in, pspn, candidate);
        GlobalProperties gProps = candidate.getGlobalProperties().clone();
        LocalProperties lProps = candidate.getLocalProperties().clone();
        node.initProperties(gProps, lProps);
        target.add(node);
      }
    }
    else if(candidates.size() > 0) {
      List<PlanNode> terminationCriterionCandidates = this.terminationCriterion.getAlternativePlans(estimator);

      SingleRootJoiner singleRoot = (SingleRootJoiner) this.singleRoot;
     
      for (PlanNode candidate : candidates) {
        for(PlanNode terminationCandidate : terminationCriterionCandidates) {
          if (singleRoot.areBranchCompatible(candidate, terminationCandidate)) {
            BulkIterationPlanNode node = new BulkIterationPlanNode(this, "BulkIteration ("+this.getPactContract().getName()+")", in, pspn, candidate, terminationCandidate);
            GlobalProperties gProps = candidate.getGlobalProperties().clone();
            LocalProperties lProps = candidate.getLocalProperties().clone();
            node.initProperties(gProps, lProps);
            target.add(node);
           
          }
        }
View Full Code Here

      writer.print("\n\t\t]");
    }

    {
      // output node local properties
      LocalProperties lp = p.getLocalProperties();

      writer.print(",\n\t\t\"local_properties\": [\n");

      if (lp.getOrdering() != null) {
        addProperty(writer, "Order", lp.getOrdering().toString(), true)
      }
      else {
        addProperty(writer, "Order", "(none)", true);
      }
      if (lp.getGroupedFields() != null && lp.getGroupedFields().size() > 0) {
        addProperty(writer, "Grouped on", lp.getGroupedFields().toString(), false);
      } else {
        addProperty(writer, "Grouping", "not grouped", false)
      }
      if (n.getUniqueFields() == null || n.getUniqueFields().size() == 0) {
        addProperty(writer, "Uniqueness", "not unique", false);
View Full Code Here

  }
 
  protected void addLocalCandidates(Channel template, List<Set<? extends NamedChannel>> broadcastPlanChannels, RequestedGlobalProperties rgps,
      List<PlanNode> target, CostEstimator estimator)
  {
    final LocalProperties lp = template.getLocalPropertiesAfterShippingOnly();
    for (RequestedLocalProperties ilp : this.inConn.getInterestingProperties().getLocalProperties()) {
      final Channel in = template.clone();
      if (ilp.isMetBy(lp)) {
        in.setLocalStrategy(LocalStrategy.NONE);
      } else {
View Full Code Here

      final SingleInputPlanNode node = dps.instantiate(in, this);
      node.setBroadcastInputs(broadcastChannelsCombination);
     
      // compute how the strategy affects the properties
      GlobalProperties gProps = in.getGlobalProperties().clone();
      LocalProperties lProps = in.getLocalProperties().clone();
      gProps = dps.computeGlobalProperties(gProps);
      lProps = dps.computeLocalProperties(lProps);
     
      // filter by the user code field copies
      gProps = gProps.filterByNodesConstantSet(this, 0);
      lProps = lProps.filterByNodesConstantSet(this, 0);
     
      // apply
      node.initProperties(gProps, lProps);
      node.updatePropertiesWithUniqueSets(getUniqueFields());
      target.add(node);
View Full Code Here

    }
  }

  @Override
  public LocalProperties computeLocalProperties(LocalProperties in1, LocalProperties in2) {
    return new LocalProperties();
  }
View Full Code Here

    return new GlobalProperties();
  }
 
  @Override
  public LocalProperties computeLocalProperties(LocalProperties lProps) {
    return new LocalProperties();
  }
View Full Code Here

 
  protected void addLocalCandidates(Channel template1, Channel template2, List<Set<? extends NamedChannel>> broadcastPlanChannels,
      RequestedGlobalProperties rgps1, RequestedGlobalProperties rgps2,
      List<PlanNode> target, LocalPropertiesPair[] validLocalCombinations, CostEstimator estimator)
  {
    final LocalProperties lp1 = template1.getLocalPropertiesAfterShippingOnly();
    final LocalProperties lp2 = template2.getLocalPropertiesAfterShippingOnly();
   
    for (RequestedLocalProperties ilp1 : this.input1.getInterestingProperties().getLocalProperties()) {
      final Channel in1 = template1.clone();
      if (ilp1.isMetBy(lp1)) {
        in1.setLocalStrategy(LocalStrategy.NONE);
View Full Code Here

TOP

Related Classes of eu.stratosphere.compiler.dataproperties.LocalProperties

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.