-2

A new Graphx example is posted on Apache's git hub repository at https://github.com/apache/spark/blob/master/examples/src/main/scala/org/apache/spark/examples/graphx/SSSPExample.scala.

The code includes a line: bin/run-example graphx.SSSPExample

I've tried run-example as above, but did not work. I think that I need to build a JAR firstly. I do not have experience with sbt. Any suggestion?

welli
  • 24
  • 3

1 Answers1

1

In general all example can be executed with pre-built binaries by using bin/run-examples and passing class name. SSSPExample is relatively new addition though (it has been merged a few days ago) so you'll have to use nightly builds or build Spark from source.

After that just go to SPARK_HOME and execute:

bin/run-example graphx.SSSPExample

Alternatively just adjust this code according to the version of Spark you use and build or execute in interactive shell.

zero323
  • 322,348
  • 103
  • 959
  • 935
  • Thanks for answering, it's a good suggestion. To avoid building Spark ( or downloading a new bin files) I wonder how can I incorporate this new source code SSSPExample to lib/spark-examples-1.6.0-hadoop2.6.0.jar. – welli Jul 05 '16 at 20:33
  • a) It is not even remotely that simple. b) This code is not 1.6 compatible anyway. – zero323 Jul 05 '16 at 22:13