Package eu.stratosphere.compiler.dataproperties

Examples of eu.stratosphere.compiler.dataproperties.InterestingProperties


    return true;
  }
 
  @Override
  public void computeInterestingPropertiesForInputs(CostEstimator estimator) {
    final InterestingProperties intProps = getInterestingProperties().clone();
   
    if (this.terminationCriterion != null) {
      // first propagate through termination Criterion. since it has no successors, it has no
      // interesting properties
      this.terminationCriterionRootConnection.setInterestingProperties(new InterestingProperties());
      this.terminationCriterion.accept(new InterestingPropertyVisitor(estimator));
    }
   
    // we need to make 2 interesting property passes, because the root of the step function needs also
    // the interesting properties as generated by the partial solution
   
    // give our own interesting properties (as generated by the iterations successors) to the step function and
    // make the first pass
    this.rootConnection.setInterestingProperties(intProps);
    this.nextPartialSolution.accept(new InterestingPropertyVisitor(estimator));
   
    // take the interesting properties of the partial solution and add them to the root interesting properties
    InterestingProperties partialSolutionIntProps = this.partialSolution.getInterestingProperties();
    intProps.getGlobalProperties().addAll(partialSolutionIntProps.getGlobalProperties());
    intProps.getLocalProperties().addAll(partialSolutionIntProps.getLocalProperties());
   
    // clear all interesting properties to prepare the second traversal
    // this clears only the path down from the next partial solution. The paths down
    // from the termination criterion (before they meet the paths down from the next partial solution)
    // remain unaffected by this step
    this.rootConnection.clearInterestingProperties();
    this.nextPartialSolution.accept(InterestingPropertiesClearer.INSTANCE);
   
    // 2nd pass
    this.rootConnection.setInterestingProperties(intProps);
    this.nextPartialSolution.accept(new InterestingPropertyVisitor(estimator));
   
    // now add the interesting properties of the partial solution to the input
    final InterestingProperties inProps = this.partialSolution.getInterestingProperties().clone();
    inProps.addGlobalProperties(new RequestedGlobalProperties());
    inProps.addLocalProperties(new RequestedLocalProperties());
    this.inConn.setInterestingProperties(inProps);
  }
View Full Code Here


   */
  public void computeUnionOfInterestingPropertiesFromSuccessors() {
    List<PactConnection> conns = getOutgoingConnections();
    if (conns.size() == 0) {
      // no incoming, we have none ourselves
      this.intProps = new InterestingProperties();
    } else {
      this.intProps = conns.get(0).getInterestingProperties().clone();
      for (int i = 1; i < conns.size(); i++) {
        this.intProps.addInterestingProperties(conns.get(i).getInterestingProperties());
      }
View Full Code Here

  }

  @Override
  public void computeInterestingPropertiesForInputs(CostEstimator estimator) {
    // get what we inherit and what is preserved by our user code
    final InterestingProperties props = getInterestingProperties().filterByCodeAnnotations(this, 0);
   
    // add all properties relevant to this node
    for (OperatorDescriptorSingle dps : getPossibleProperties()) {
      for (RequestedGlobalProperties gp : dps.getPossibleGlobalProperties()) {
        props.addGlobalProperties(gp);
      }
      for (RequestedLocalProperties lp : dps.getPossibleLocalProperties()) {
        props.addLocalProperties(lp);
      }
    }
    this.inConn.setInterestingProperties(props);
   
    for (PactConnection conn : getBroadcastConnections()) {
      conn.setInterestingProperties(new InterestingProperties());
    }
  }
View Full Code Here

    getInterestingProperties().getLocalProperties().clear();
  }
 
  @Override
  public void computeInterestingPropertiesForInputs(CostEstimator estimator) {
    final InterestingProperties props = getInterestingProperties();
   
    // if no other properties exist, add the pruned trivials back
    if (props.getGlobalProperties().isEmpty()) {
      props.addGlobalProperties(new RequestedGlobalProperties());
    }
    props.addLocalProperties(new RequestedLocalProperties());
    this.input1.setInterestingProperties(props.clone());
    this.input2.setInterestingProperties(props.clone());
   
    this.channelProps = props.getGlobalProperties();
  }
View Full Code Here

  }

  @Override
  public void computeInterestingPropertiesForInputs(CostEstimator estimator) {
    // get what we inherit and what is preserved by our user code
    final InterestingProperties props1 = getInterestingProperties().filterByCodeAnnotations(this, 0);
    final InterestingProperties props2 = getInterestingProperties().filterByCodeAnnotations(this, 1);
   
    // add all properties relevant to this node
    for (OperatorDescriptorDual dpd : this.possibleProperties) {
      for (GlobalPropertiesPair gp : dpd.getPossibleGlobalProperties()) {
        // input 1
        props1.addGlobalProperties(gp.getProperties1());
       
        // input 2
        props2.addGlobalProperties(gp.getProperties2());
      }
      for (LocalPropertiesPair lp : dpd.getPossibleLocalProperties()) {
        // input 1
        props1.addLocalProperties(lp.getProperties1());
       
        // input 2
        props2.addLocalProperties(lp.getProperties2());
      }
    }
    this.input1.setInterestingProperties(props1);
    this.input2.setInterestingProperties(props2);
   
    for (PactConnection conn : getBroadcastConnections()) {
      conn.setInterestingProperties(new InterestingProperties());
    }
  }
View Full Code Here

    this.estimatedOutputSize = getPredecessorNode().getEstimatedOutputSize();
  }

  @Override
  public void computeInterestingPropertiesForInputs(CostEstimator estimator) {
    final InterestingProperties iProps = new InterestingProperties();
   
    {
      final Ordering partitioning = getPactContract().getPartitionOrdering();
      final DataDistribution dataDist = getPactContract().getDataDistribution();
      final RequestedGlobalProperties partitioningProps = new RequestedGlobalProperties();
      if (partitioning != null) {
        if(dataDist != null) {
          partitioningProps.setRangePartitioned(partitioning, dataDist);
        } else {
          partitioningProps.setRangePartitioned(partitioning);
        }
        iProps.addGlobalProperties(partitioningProps);
      }
      iProps.addGlobalProperties(partitioningProps);
    }
   
    {
      final Ordering localOrder = getPactContract().getLocalOrder();
      final RequestedLocalProperties orderProps = new RequestedLocalProperties();
      if (localOrder != null) {
        orderProps.setOrdering(localOrder);
      }
      iProps.addLocalProperties(orderProps);
    }
   
    this.input.setInterestingProperties(iProps);
  }
View Full Code Here

    final int inNumInstances = inDop / inSubPerInstance + (inDop % inSubPerInstance == 0 ? 0 : 1);
   
    final boolean globalDopChange = numInstances != inNumInstances;
    final boolean localDopChange = numInstances == inNumInstances & subPerInstance != inSubPerInstance;
   
    InterestingProperties ips = this.input.getInterestingProperties();
    for (PlanNode p : subPlans) {
      for (RequestedGlobalProperties gp : ips.getGlobalProperties()) {
        for (RequestedLocalProperties lp : ips.getLocalProperties()) {
          Channel c = new Channel(p);
          gp.parameterizeChannel(c, globalDopChange, localDopChange);

          if (lp.isMetBy(c.getLocalPropertiesAfterShippingOnly())) {
            c.setLocalStrategy(LocalStrategy.NONE);
View Full Code Here

    // as initial interesting properties, we have the trivial ones for the step function,
    // and partitioned on the solution set key for the solution set delta
   
    RequestedGlobalProperties partitionedProperties = new RequestedGlobalProperties();
    partitionedProperties.setHashPartitioned(this.solutionSetKeyFields);
    InterestingProperties partitionedIP = new InterestingProperties();
    partitionedIP.addGlobalProperties(partitionedProperties);
    partitionedIP.addLocalProperties(new RequestedLocalProperties());
   
    this.nextWorksetRootConnection.setInterestingProperties(new InterestingProperties());
    this.solutionSetDeltaRootConnection.setInterestingProperties(partitionedIP.clone());
   
    InterestingPropertyVisitor ipv = new InterestingPropertyVisitor(estimator);
    this.nextWorkset.accept(ipv);
    this.solutionSetDelta.accept(ipv);
   
    // take the interesting properties of the partial solution and add them to the root interesting properties
    InterestingProperties worksetIntProps = this.worksetNode.getInterestingProperties();
    InterestingProperties intProps = new InterestingProperties();
    intProps.getGlobalProperties().addAll(worksetIntProps.getGlobalProperties());
    intProps.getLocalProperties().addAll(worksetIntProps.getLocalProperties());
   
    // clear all interesting properties to prepare the second traversal
    this.nextWorksetRootConnection.clearInterestingProperties();
    this.nextWorkset.accept(InterestingPropertiesClearer.INSTANCE);
   
    // 2nd pass
    this.nextWorksetRootConnection.setInterestingProperties(intProps);
    this.nextWorkset.accept(ipv);
   
    // now add the interesting properties of the workset to the workset input
    final InterestingProperties inProps = this.worksetNode.getInterestingProperties().clone();
    inProps.addGlobalProperties(new RequestedGlobalProperties());
    inProps.addLocalProperties(new RequestedLocalProperties());
    this.input2.setInterestingProperties(inProps);
   
    // the partial solution must be hash partitioned, so it has only that as interesting properties
    this.input1.setInterestingProperties(partitionedIP);
  }
View Full Code Here

TOP

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

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.