You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hama.apache.org by "Edward J. Yoon" <ed...@apache.org> on 2012/06/08 02:21:53 UTC
Re: svn commit: r1347678 - /incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java
Arguments were defined in wrong order. I've committed to TRUNK directly.
On Fri, Jun 8, 2012 at 12:25 AM, <tj...@apache.org> wrote:
> Author: tjungblut
> Date: Thu Jun 7 15:25:15 2012
> New Revision: 1347678
>
> URL: http://svn.apache.org/viewvc?rev=1347678&view=rev
> Log:
> fix small bug
>
> Modified:
> incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java
>
> Modified: incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java
> URL: http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java?rev=1347678&r1=1347677&r2=1347678&view=diff
> ==============================================================================
> --- incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java (original)
> +++ incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java Thu Jun 7 15:25:15 2012
> @@ -34,12 +34,13 @@ import org.apache.hama.graph.GraphJob;
> import org.apache.hama.graph.Vertex;
> import org.apache.hama.graph.VertexInputReader;
>
> -public class InlinkCount extends Vertex<Text, NullWritable, IntWritable> {
> +public class InlinkCount extends Vertex<Text, IntWritable, NullWritable> {
>
> @Override
> public void compute(Iterator<IntWritable> messages) throws IOException {
>
> if (getSuperstepCount() == 0L) {
> + setValue(new IntWritable(0));
> sendMessageToNeighbors(new IntWritable(1));
> } else {
> while (messages.hasNext()) {
> @@ -50,7 +51,7 @@ public class InlinkCount extends Vertex<
> }
>
> public static class InlinkCountTextReader extends
> - VertexInputReader<LongWritable, Text, Text, NullWritable, IntWritable> {
> + VertexInputReader<LongWritable, Text, Text, IntWritable, NullWritable> {
>
> /**
> * The text file essentially should look like: <br/>
> @@ -62,7 +63,7 @@ public class InlinkCount extends Vertex<
> */
> @Override
> public boolean parseVertex(LongWritable key, Text value,
> - Vertex<Text, NullWritable, IntWritable> vertex) {
> + Vertex<Text, IntWritable, NullWritable> vertex) {
> String[] split = value.toString().split("\t");
> for (int i = 0; i < split.length; i++) {
> if (i == 0) {
>
>
--
Best Regards, Edward J. Yoon
@eddieyoon
Re: svn commit: r1347678 - /incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java
Posted by Thomas Jungblut <th...@googlemail.com>.
Thanks!
2012/6/8 Edward J. Yoon <ed...@apache.org>
> Arguments were defined in wrong order. I've committed to TRUNK directly.
>
> On Fri, Jun 8, 2012 at 12:25 AM, <tj...@apache.org> wrote:
> > Author: tjungblut
> > Date: Thu Jun 7 15:25:15 2012
> > New Revision: 1347678
> >
> > URL: http://svn.apache.org/viewvc?rev=1347678&view=rev
> > Log:
> > fix small bug
> >
> > Modified:
> >
> incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java
> >
> > Modified:
> incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java
> > URL:
> http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java?rev=1347678&r1=1347677&r2=1347678&view=diff
> >
> ==============================================================================
> > ---
> incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java
> (original)
> > +++
> incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java
> Thu Jun 7 15:25:15 2012
> > @@ -34,12 +34,13 @@ import org.apache.hama.graph.GraphJob;
> > import org.apache.hama.graph.Vertex;
> > import org.apache.hama.graph.VertexInputReader;
> >
> > -public class InlinkCount extends Vertex<Text, NullWritable,
> IntWritable> {
> > +public class InlinkCount extends Vertex<Text, IntWritable,
> NullWritable> {
> >
> > @Override
> > public void compute(Iterator<IntWritable> messages) throws IOException
> {
> >
> > if (getSuperstepCount() == 0L) {
> > + setValue(new IntWritable(0));
> > sendMessageToNeighbors(new IntWritable(1));
> > } else {
> > while (messages.hasNext()) {
> > @@ -50,7 +51,7 @@ public class InlinkCount extends Vertex<
> > }
> >
> > public static class InlinkCountTextReader extends
> > - VertexInputReader<LongWritable, Text, Text, NullWritable,
> IntWritable> {
> > + VertexInputReader<LongWritable, Text, Text, IntWritable,
> NullWritable> {
> >
> > /**
> > * The text file essentially should look like: <br/>
> > @@ -62,7 +63,7 @@ public class InlinkCount extends Vertex<
> > */
> > @Override
> > public boolean parseVertex(LongWritable key, Text value,
> > - Vertex<Text, NullWritable, IntWritable> vertex) {
> > + Vertex<Text, IntWritable, NullWritable> vertex) {
> > String[] split = value.toString().split("\t");
> > for (int i = 0; i < split.length; i++) {
> > if (i == 0) {
> >
> >
>
>
>
> --
> Best Regards, Edward J. Yoon
> @eddieyoon
>
--
Thomas Jungblut
Berlin <th...@gmail.com>