You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by yxzhao <yx...@ualr.edu> on 2014/03/09 23:52:17 UTC

TriangleCount & Shortest Path under Spark

Hi All, 
  
I have already set up Spark-0.9.0-incubating on our school's cluster. I
successfully run the Spark PageRank demo located in 
/spark-0.9.0-incubating/examples/src/main/scala/org/apache/spark/examples. 
  
Problem 1. I want to run the TriangleCount whose source code located
in/spark-0.9.0-incubating/graphx/src/main/scala/org/apache/spark/graphx/lib.
I used the following command. 
./bin/run-example org.apache.spark.graphx.GraphOps.TriangleCount
spark://10.1.255.206:7077 
 But it did not work. Is there any mistake in my command line? Could anybody
let me know how to correctly run the TriangleCount demo. Thanks very much. 
  
Problem 2.  Does anybody have shortest path implementation code under Spark?
If so could you share it with me? 
  
Thanks in advance, 
Regards, 
Joey  





--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/TriangleCount-Shortest-Path-under-Spark-tp2438.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Re: TriangleCount & Shortest Path under Spark

Posted by moxiecui <mo...@gmail.com>.
Well, you could run the driver in several ways, like using IDEA run, or using
sbt run, the spark-shell, or even the run-example script, so long as you
give the driver the right args. Here is an example using run-example script:

# in spark-0.9.0 home dir, the first arg is your master, the second is app
name, and last arg is the file used. 
$ bin/run-example org.apache.spark.graphx.lib.Analytics local triangles
graphx/data/followers.txt

Hope this will be helpful. 



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/TriangleCount-Shortest-Path-under-Spark-tp2439p2635.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Re: TriangleCount & Shortest Path under Spark

Posted by yxzhao <yx...@ualr.edu>.
Thanks very much Cui.
Could you give me more detail about how to run the driver? I tried sometimes
but all failed. 
 




--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/TriangleCount-Shortest-Path-under-Spark-tp2439p2608.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Re: TriangleCount & Shortest Path under Spark

Posted by moxiecui <mo...@gmail.com>.
1. There is a driver program named Analystics with a main method in
graphx/.../lib, you should start the TriangleCount by this driver. 
2. Good luck. 



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/TriangleCount-Shortest-Path-under-Spark-tp2439p2577.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Re: TriangleCount & Shortest Path under Spark

Posted by Keith Massey <ke...@digitalreasoning.com>.
The triangle count failed for me when I ran it on more than one node. There
was this assertion in TriangleCount.scala:
         // double count should be even (divisible by two)
        assert((dblCount & 1) == 0)
That did not hold true when I ran this on multiple nodes, even when
following the guidelines to make sure that all source ids are greater than
destination ids and partitioning the graph using RandomVertexCut. I didn't
dig into the code to see why this assertion was failing, but commenting
that line out allowed the code to run. I'm not sure how much I can trust
the results, but they looked generally right. Not sure if this is the
failure you are talking about or not.

As far as shortest path, the programming guide had an example that worked
well for me under
https://spark.incubator.apache.org/docs/latest/graphx-programming-guide.html#pregel-api
.

Keith


On Sun, Mar 9, 2014 at 5:52 PM, yxzhao <yx...@ualr.edu> wrote:

> Hi All,
>
> I have already set up Spark-0.9.0-incubating on our school's cluster. I
> successfully run the Spark PageRank demo located in
> /spark-0.9.0-incubating/examples/src/main/scala/org/apache/spark/examples.
>
> Problem 1. I want to run the TriangleCount whose source code located
>
> in/spark-0.9.0-incubating/graphx/src/main/scala/org/apache/spark/graphx/lib.
> I used the following command.
> ./bin/run-example org.apache.spark.graphx.GraphOps.TriangleCount
> spark://10.1.255.206:7077
>  But it did not work. Is there any mistake in my command line? Could
> anybody
> let me know how to correctly run the TriangleCount demo. Thanks very much.
>
> Problem 2.  Does anybody have shortest path implementation code under
> Spark?
> If so could you share it with me?
>
> Thanks in advance,
> Regards,
> Joey
>
>
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/TriangleCount-Shortest-Path-under-Spark-tp2438.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>