You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hama.apache.org by Apache Wiki <wi...@apache.org> on 2012/08/29 06:53:39 UTC

[Hama Wiki] Update of "WriteHamaGraphFile" by edwardyoon

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hama Wiki" for change notification.

The "WriteHamaGraphFile" page has been changed by edwardyoon:
http://wiki.apache.org/hama/WriteHamaGraphFile?action=diff&rev1=5&rev2=6

  To read this kind of file you need to provide a vertex reader like this:
  
  {{{
-  public static class PagerankTextReader extends
+  public static class WikipediaLinkDatasetReader extends
        VertexInputReader<LongWritable, Text, Text, NullWritable, DoubleWritable> {
  
      @Override
      public boolean parseVertex(LongWritable key, Text value,
-         Vertex<Text, DoubleWritable, NullWritable> vertex) {
+         Vertex<Text, NullWritable, DoubleWritable> vertex) {
        String[] vertexAdjacents = value.toString().split(":");
        vertex.setVertexID(new Text(vertexAdjacents[0].trim()));
        String[] split = vertexAdjacents[1].split(" ");