private SubplanPattern createSubplanPattern() { final OperatorPattern operatorPattern = new OperatorPattern<>( "pageRank", new PageRankOperator(1), false ); return SubplanPattern.createSingleton(operatorPattern); }
/** * Copies an instance (exclusive of broadcasts). * * @param that that should be copied */ public PageRankOperator(PageRankOperator that) { super(that); this.numIterations = that.getNumIterations(); this.dampingFactor = that.dampingFactor; this.graphDensity = that.graphDensity; }
private Operator createPageRankSubplan(PageRankOperator pageRankOperator, int epoch) { final String operatorBaseName = pageRankOperator.getName() == null ? "PageRank" : pageRankOperator.getName(); pageRankOperator.getNumIterations(), ReflectionUtils.specify(Tuple2.class) ); loopHead.at(epoch); new ApplyDamping(pageRankOperator.getDampingFactor()), ReflectionUtils.specify(Tuple2.class), ReflectionUtils.specify(Tuple2.class)
@Override public Optional<CardinalityEstimator> createCardinalityEstimator(int outputIndex, Configuration configuration) { switch (outputIndex) { case 0: return Optional.of((optimizationContext, inputEstimates) -> { assert inputEstimates.length == 1; return new CardinalityEstimate( calculateNumVertices(inputEstimates[0].getLowerEstimate(), PageRankOperator.this.graphDensity.getUpperEstimate()), calculateNumVertices(inputEstimates[0].getUpperEstimate(), PageRankOperator.this.graphDensity.getLowerEstimate()), inputEstimates[0].getCorrectnessProbability() * PageRankOperator.this.graphDensity.getCorrectnessProbability() ); }); default: throw new IllegalArgumentException(String.format("%s does not have an OutputSlot with index %d.", this, outputIndex)); } }
private SubplanPattern createPattern() { return SubplanPattern.createSingleton(new OperatorPattern<>( "pageRank", new PageRankOperator(1), false )); }
private SubplanPattern createSubplanPattern() { final OperatorPattern operatorPattern = new OperatorPattern<>( "pageRank", new PageRankOperator(1), false ); return SubplanPattern.createSingleton(operatorPattern); }
@SuppressWarnings("unchecked") private SubplanPattern createSubplanPattern() { final OperatorPattern operatorPattern = new OperatorPattern( "pageRank", new PageRankOperator(1), false); return SubplanPattern.createSingleton(operatorPattern); }