hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hama Wiki] Update of "WriteHamaGraphFile" by edwardyoon
Date Wed, 29 Aug 2012 04:53:39 GMT
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:

  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> {
      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(" ");

View raw message