DeltaIteration.setSolutionSetUnManaged
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.apache.flink.api.java.operators.DeltaIteration.setSolutionSetUnManaged(Showing top 12 results out of 315)

origin: apache/flink

/**
 * Helper method which sets up an iteration with the given vertex value(either simple or with degrees).
 *
 * @param iteration
 */
private void setUpIteration(DeltaIteration<?, ?> iteration) {
  // set up the iteration operator
  if (this.configuration != null) {
    iteration.name(this.configuration.getName("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")"));
    iteration.parallelism(this.configuration.getParallelism());
    iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory());
    // register all aggregators
    for (Map.Entry<String, Aggregator<?>> entry : this.configuration.getAggregators().entrySet()) {
      iteration.registerAggregator(entry.getKey(), entry.getValue());
    }
  }
  else {
    // no configuration provided; set default name
    iteration.name("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")");
  }
}
origin: apache/flink

@Override
protected void testProgram() throws Exception {
  // set up execution environment
  ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
  // read vertex and edge data
  DataSet<Tuple1<Long>> vertices = env.readCsvFile(verticesPath).types(Long.class);
  DataSet<Tuple2<Long, Long>> edges = env.readCsvFile(edgesPath).fieldDelimiter(" ").types(Long.class, Long.class)
                      .flatMap(new UndirectEdge());
  // assign the initial components (equal to the vertex id)
  DataSet<Tuple2<Long, Long>> verticesWithInitialId = vertices.map(new ConnectedComponentsITCase.DuplicateValue<Long>());
  // open a delta iteration
  DeltaIteration<Tuple2<Long, Long>, Tuple2<Long, Long>> iteration =
      verticesWithInitialId.iterateDelta(verticesWithInitialId, 100, 0);
  iteration.setSolutionSetUnManaged(true);
  // apply the step logic: join with the edges, select the minimum neighbor, update if the component of the candidate is smaller
  DataSet<Tuple2<Long, Long>> changes = iteration.getWorkset().join(edges).where(0).equalTo(0).with(new NeighborWithComponentIDJoin())
      .groupBy(0).aggregate(Aggregations.MIN, 1)
      .join(iteration.getSolutionSet()).where(0).equalTo(0)
      .with(new ComponentIdFilter());
  // close the delta iteration (delta and new workset are identical)
  DataSet<Tuple2<Long, Long>> result = iteration.closeWith(changes, changes);
  result.writeAsCsv(resultPath, "\n", " ");
  // execute program
  env.execute("Connected Components Example");
}
origin: apache/flink

    "Gather-sum-apply iteration (" + gather + " | " + sum + " | " + apply + ")"));
iteration.parallelism(this.configuration.getParallelism());
iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory());
origin: apache/flink

/**
 * Helper method which sets up an iteration with the given vertex value.
 *
 * @param iteration
 */
private void setUpIteration(DeltaIteration<?, ?> iteration) {
  // set up the iteration operator
  if (this.configuration != null) {
    iteration.name(this.configuration.getName("Vertex-centric iteration (" + computeFunction + ")"));
    iteration.parallelism(this.configuration.getParallelism());
    iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory());
    // register all aggregators
    for (Map.Entry<String, Aggregator<?>> entry : this.configuration.getAggregators().entrySet()) {
      iteration.registerAggregator(entry.getKey(), entry.getValue());
    }
  }
  else {
    // no configuration provided; set default name
    iteration.name("Vertex-centric iteration (" + computeFunction + ")");
  }
}
origin: apache/flink

 maxIterations)
iterativeSet.setSolutionSetUnManaged(solutionSetUnManaged)
 maxIterations)
iterativeSet.setSolutionSetUnManaged(solutionSetUnManaged)
origin: org.apache.flink/flink-gelly_2.11

/**
 * Helper method which sets up an iteration with the given vertex value(either simple or with degrees).
 *
 * @param iteration
 */
private void setUpIteration(DeltaIteration<?, ?> iteration) {
  // set up the iteration operator
  if (this.configuration != null) {
    iteration.name(this.configuration.getName("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")"));
    iteration.parallelism(this.configuration.getParallelism());
    iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory());
    // register all aggregators
    for (Map.Entry<String, Aggregator<?>> entry : this.configuration.getAggregators().entrySet()) {
      iteration.registerAggregator(entry.getKey(), entry.getValue());
    }
  }
  else {
    // no configuration provided; set default name
    iteration.name("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")");
  }
}
origin: org.apache.flink/flink-gelly_2.10

/**
 * Helper method which sets up an iteration with the given vertex value
 *
 * @param iteration
 */
private void setUpIteration(DeltaIteration<?, ?> iteration) {
  // set up the iteration operator
  if (this.configuration != null) {
    iteration.name(this.configuration.getName("Vertex-centric iteration (" + computeFunction + ")"));
    iteration.parallelism(this.configuration.getParallelism());
    iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory());
    // register all aggregators
    for (Map.Entry<String, Aggregator<?>> entry : this.configuration.getAggregators().entrySet()) {
      iteration.registerAggregator(entry.getKey(), entry.getValue());
    }
  }
  else {
    // no configuration provided; set default name
    iteration.name("Vertex-centric iteration (" + computeFunction + ")");
  }
}
origin: org.apache.flink/flink-gelly_2.10

/**
 * Helper method which sets up an iteration with the given vertex value(either simple or with degrees)
 *
 * @param iteration
 */
private void setUpIteration(DeltaIteration<?, ?> iteration) {
  // set up the iteration operator
  if (this.configuration != null) {
    iteration.name(this.configuration.getName("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")"));
    iteration.parallelism(this.configuration.getParallelism());
    iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory());
    // register all aggregators
    for (Map.Entry<String, Aggregator<?>> entry : this.configuration.getAggregators().entrySet()) {
      iteration.registerAggregator(entry.getKey(), entry.getValue());
    }
  }
  else {
    // no configuration provided; set default name
    iteration.name("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")");
  }
}
origin: org.apache.flink/flink-gelly_2.11

/**
 * Helper method which sets up an iteration with the given vertex value.
 *
 * @param iteration
 */
private void setUpIteration(DeltaIteration<?, ?> iteration) {
  // set up the iteration operator
  if (this.configuration != null) {
    iteration.name(this.configuration.getName("Vertex-centric iteration (" + computeFunction + ")"));
    iteration.parallelism(this.configuration.getParallelism());
    iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory());
    // register all aggregators
    for (Map.Entry<String, Aggregator<?>> entry : this.configuration.getAggregators().entrySet()) {
      iteration.registerAggregator(entry.getKey(), entry.getValue());
    }
  }
  else {
    // no configuration provided; set default name
    iteration.name("Vertex-centric iteration (" + computeFunction + ")");
  }
}
origin: org.apache.flink/flink-gelly_2.10

    "Gather-sum-apply iteration (" + gather + " | " + sum + " | " + apply + ")"));
iteration.parallelism(this.configuration.getParallelism());
iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory());
origin: org.apache.flink/flink-gelly_2.11

    "Gather-sum-apply iteration (" + gather + " | " + sum + " | " + apply + ")"));
iteration.parallelism(this.configuration.getParallelism());
iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory());
origin: org.apache.flink/flink-scala_2.11

 maxIterations)
iterativeSet.setSolutionSetUnManaged(solutionSetUnManaged)
 maxIterations)
iterativeSet.setSolutionSetUnManaged(solutionSetUnManaged)
org.apache.flink.api.java.operatorsDeltaIterationsetSolutionSetUnManaged

Javadoc

Sets whether to keep the solution set in managed memory (safe against heap exhaustion) or unmanaged memory (objects on heap).

Popular methods of DeltaIteration

  • getSolutionSet
    Gets the solution set of the delta iteration. The solution set represents the state that is kept acr
  • getWorkset
    Gets the working set of the delta iteration. The working set is constructed by the previous iteratio
  • closeWith
    Closes the delta iteration. This method defines the end of the delta iteration's function.
  • name
    Sets the name for the iteration. The name is displayed in logs and messages.
  • registerAggregator
    Registers an Aggregator for the iteration. Aggregators can be used to maintain simple statistics dur
  • parallelism
    Sets the parallelism for the iteration.
  • <init>
  • getAggregators
    Gets the registry for aggregators for the iteration.
  • getInitialSolutionSet
    Gets the initial solution set. This is the data set on which the delta iteration was started.Conside
  • getInitialWorkset
    Gets the initial workset. This is the data set passed to the method that starts the delta iteration.
  • getMinResources
    Gets the minimum resources from this iteration. If no minimum resources have been set, it returns th
  • getName
    Gets the name from this iteration.
  • getMinResources,
  • getName,
  • getParallelism,
  • getPreferredResources,
  • isSolutionSetUnManaged,
  • registerAggregationConvergenceCriterion

Popular classes and methods

  • getSystemService (Context)
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • GridLayout (java.awt)
  • Window (java.awt)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Format (java.text)
    Format is an abstract base class for formatting locale-sensitive information such as dates, messages
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)