Sotera / spark-distributed-louvain-modularity

Spark / graphX implementation of the distributed louvain modularity algorithm
Apache License 2.0
311 stars 153 forks source link

could not find main class #4

Open IsamAljawarneh opened 7 years ago

IsamAljawarneh commented 7 years ago

hi, i am trying to run your code in an ubuntu machine. after compiling and packaging i tried the command louvian but i always get this error:

Error: Could not find or load main class com.soteradefense.dga.graphx.louvain.Main

what probably could be the cause and how can i fix it.

Regards aljawarneh

ArrowLuo commented 7 years ago

I received such a error too, but I solved it by rewrite dga-mr1-graphx, it as follows:


! /bin/bash

export DGA_CLASSPATH=./lib export SPARK_JARS_ASSEMBLY=/home/spark/spark-1.5.2-bin-hadoop2.6/lib/:/usr/lib/jvm/scala-2.11.8/lib/

T="$(date +%s)"

java -cp $SPARK_JARS_ASSEMBLY:$DGA_CLASSPATH/dga-graphx-0.1.jar:$DGA_CLASSPATH/dga-core-0.0.1.jar:$DGA_CLASSPATH/config-1.2.1.jar:./conf com.soteradefense.dga.graphx.DGARunner "$@"

T="$(($(date +%s)-T))" echo "Time in seconds: ${T}"


you need replace SPARK_JARS_ASSEMBLY with your own spark and scala path.

Hope it is useful to you!

lisongs1995 commented 6 years ago

same with u, meeting the error that can not find the class