Package eu.stratosphere.api.common.aggregators

Examples of eu.stratosphere.api.common.aggregators.AggregatorRegistry


      // tell the head that it needs to wait for the solution set updates
      headConfig.setWaitForSolutionSetUpdate();
    }
   
    // ------------------- register the aggregators -------------------
    AggregatorRegistry aggs = bulkNode.getIterationNode().getIterationContract().getAggregators();
    Collection<AggregatorWithName<?>> allAggregators = aggs.getAllRegisteredAggregators();
   
    headConfig.addIterationAggregators(allAggregators);
    syncConfig.addIterationAggregators(allAggregators);
   
    String convAggName = aggs.getConvergenceCriterionAggregatorName();
    Class<? extends ConvergenceCriterion<?>> convCriterion = aggs.getConvergenceCriterion();
   
    if (convCriterion != null || convAggName != null) {
      if (convCriterion == null) {
        throw new CompilerException("Error: Convergence criterion aggregator set, but criterion is null.");
      }
View Full Code Here


        }
      }
    }
   
    // ------------------- register the aggregators -------------------
    AggregatorRegistry aggs = iterNode.getIterationNode().getIterationContract().getAggregators();
    Collection<AggregatorWithName<?>> allAggregators = aggs.getAllRegisteredAggregators();
   
    for (AggregatorWithName<?> agg : allAggregators) {
      if (agg.getName().equals(WorksetEmptyConvergenceCriterion.AGGREGATOR_NAME)) {
        throw new CompilerException("User defined aggregator used the same name as built-in workset " +
            "termination check aggregator: " + WorksetEmptyConvergenceCriterion.AGGREGATOR_NAME);
      }
    }
   
    headConfig.addIterationAggregators(allAggregators);
    syncConfig.addIterationAggregators(allAggregators);
   
    String convAggName = aggs.getConvergenceCriterionAggregatorName();
    Class<? extends ConvergenceCriterion<?>> convCriterion = aggs.getConvergenceCriterion();
   
    if (convCriterion != null || convAggName != null) {
      throw new CompilerException("Error: Cannot use custom convergence criterion with workset iteration. Workset iterations have implicit convergence criterion where workset is empty.");
    }
   
View Full Code Here

TOP

Related Classes of eu.stratosphere.api.common.aggregators.AggregatorRegistry

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.