Package org.apache.hama.bsp.PartitioningRunner

Examples of org.apache.hama.bsp.PartitioningRunner.RecordConverter


  private void loadVertices(
      BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer)
      throws IOException, SyncException, InterruptedException {
    final boolean selfReference = conf.getBoolean("hama.graph.self.ref", false);

    RecordConverter converter = org.apache.hadoop.util.ReflectionUtils
        .newInstance(conf.getClass(Constants.RUNTIME_PARTITION_RECORDCONVERTER,
            DefaultRecordConverter.class, RecordConverter.class), conf);

    // our VertexInputReader ensures incoming vertices are sorted by their ID
    Vertex<V, E, M> vertex = GraphJobRunner
        .<V, E, M> newVertexInstance(VERTEX_CLASS);
    Vertex<V, E, M> currentVertex = GraphJobRunner
        .<V, E, M> newVertexInstance(VERTEX_CLASS);

    KeyValuePair<Writable, Writable> record = null;
    KeyValuePair<Writable, Writable> converted = null;

    while ((record = peer.readNext()) != null) {
      converted = converter.convertRecord(record, conf);
      currentVertex = (Vertex<V, E, M>) converted.getValue();

      if (vertex.getVertexID() == null) {
        vertex = currentVertex;
      } else {
View Full Code Here


  private void loadVertices(
      BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer)
      throws IOException, SyncException, InterruptedException {
    final boolean selfReference = conf.getBoolean("hama.graph.self.ref", false);

    RecordConverter converter = org.apache.hadoop.util.ReflectionUtils
        .newInstance(conf.getClass(Constants.RUNTIME_PARTITION_RECORDCONVERTER,
            DefaultRecordConverter.class, RecordConverter.class), conf);

    // our VertexInputReader ensures incoming vertices are sorted by their ID
    Vertex<V, E, M> vertex = GraphJobRunner
        .<V, E, M> newVertexInstance(VERTEX_CLASS);
    KeyValuePair<Writable, Writable> record = null;
    KeyValuePair<Writable, Writable> converted = null;
    while ((record = peer.readNext()) != null) {
      converted = converter.convertRecord(record, conf);
      vertex = (Vertex<V, E, M>) converted.getKey();
      vertex.runner = this;
      vertex.setup(conf);

      if (selfReference) {
View Full Code Here

  private void loadVertices(
      BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer)
      throws IOException, SyncException, InterruptedException {
    final boolean selfReference = conf.getBoolean("hama.graph.self.ref", false);

    RecordConverter converter = org.apache.hadoop.util.ReflectionUtils
        .newInstance(conf.getClass(Constants.RUNTIME_PARTITION_RECORDCONVERTER,
            DefaultRecordConverter.class, RecordConverter.class), conf);

    // our VertexInputReader ensures incoming vertices are sorted by their ID
    Vertex<V, E, M> vertex = GraphJobRunner
        .<V, E, M> newVertexInstance(VERTEX_CLASS);
    Vertex<V, E, M> currentVertex = GraphJobRunner
        .<V, E, M> newVertexInstance(VERTEX_CLASS);

    KeyValuePair<Writable, Writable> record = null;
    KeyValuePair<Writable, Writable> converted = null;

    while ((record = peer.readNext()) != null) {
      converted = converter.convertRecord(record, conf);
      currentVertex = (Vertex<V, E, M>) converted.getValue();

      if (vertex.getVertexID() == null) {
        vertex = currentVertex;
      } else {
View Full Code Here

  private void loadVertices(
      BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer)
      throws IOException, SyncException, InterruptedException {
    final boolean selfReference = conf.getBoolean("hama.graph.self.ref", false);

    RecordConverter converter = org.apache.hadoop.util.ReflectionUtils
        .newInstance(conf.getClass(Constants.RUNTIME_PARTITION_RECORDCONVERTER,
            DefaultRecordConverter.class, RecordConverter.class), conf);

    // our VertexInputReader ensures incoming vertices are sorted by their ID
    Vertex<V, E, M> vertex = GraphJobRunner
        .<V, E, M> newVertexInstance(VERTEX_CLASS);
    KeyValuePair<Writable, Writable> record = null;
    KeyValuePair<Writable, Writable> converted = null;
    while ((record = peer.readNext()) != null) {
      converted = converter.convertRecord(record, conf);
      vertex = (Vertex<V, E, M>) converted.getKey();
      vertex.setRunner(this);
      vertex.setup(conf);

      if (selfReference) {
View Full Code Here

TOP

Related Classes of org.apache.hama.bsp.PartitioningRunner.RecordConverter

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.