Uploaded image for project: 'Giraph'
  1. Giraph
  2. GIRAPH-678

Disorder of vertex de-serialization and 'initialize' method

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0.0, 1.1.0
    • Fix Version/s: None
    • Component/s: graph
    • Labels:
      None
    • Environment:

      Giraph 1.0, hadoop 0.20.2

      Description

      In org.apache.giraph.utils.Writable.readVertexFromDataInput method.
      'initialize' method is ahead of vertex de-serialization.

      Change the order is ok:

      public static <I extends WritableComparable, V extends Writable,
      E extends Writable, M extends Writable> Vertex<I, V, E, M>
      readVertexFromDataInput(
      DataInput input,
      ImmutableClassesGiraphConfiguration<I, V, E, M> conf)
      throws IOException {
      Vertex<I, V, E, M> vertex = conf.createVertex();
      I id = conf.createVertexId();
      V value = conf.createVertexValue();
      OutEdges<I, E> edges = conf.createOutEdges();
      id.readFields(input);
      value.readFields(input);
      edges.readFields(input);
      if (input.readBoolean())

      { vertex.voteToHalt(); }

      else

      { vertex.wakeUp(); }

      vertex.initialize(id, value, edges);
      return vertex;
      }

        Attachments

          Activity

            People

            • Assignee:
              cmartella Claudio Martella
              Reporter:
              pengzhang David Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: