......
I then built the all in one jar spark-assembly-0.8.0-incubating-hadoop1.0.4.jar and put that in my project's Java build path so that I can get the SparkPi.scala compiled.
I used
val spark = new SparkContext("spark://127.0.0.1:7077", "SparkPi",
System.getenv("SPARK_HOME"), Seq(System.getenv("SPARK_EXAMPLES_JAR")))
(if I change from spark://127.0.0.1:7077 to local the code works), when I run this, the program just hang there and give me no result.
The only thing I see is:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
So I have two problems.
1. I need to get log information so that I can get better understanding of what's going on. I see the StaticLoggerBinder class is indeed in the all-in-one spark jar file too. Regardless, to try, I also added SLF4J implementation (slf4j-simple-1.7.5.jar file) in the build path and get same warning message. Why is this?
2. why the code hang without giving me the PI result? Also, why I cannot see anything happen in the web page for both the master and slave node (I suppose to see some result there as well, right)? I also checked the logs and work folder in my Spark home and didn't see anything too......
Can you help me solve this issue?
Thanks,
Xiaobing
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" org.apache.spark.SparkException: Job failed: Task 0.0:1 failed more than 4 times
at org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:760)
at org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:758)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:60)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at org.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:758)
at org.apache.spark.scheduler.DAGScheduler.processEvent(DAGScheduler.scala:379)
at org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$run(DAGScheduler.scala:441)
at org.apache.spark.scheduler.DAGScheduler$$anon$1.run(DAGScheduler.scala:149)
Spark Executor Command: "/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java" "-cp" ":/Users/xiaobinghuang/spark-0.8.0-incubating/conf:/Users/xiaobinghuang/spark-0.8.0-incubating/assembly/target/scala-2.9.3/spark-assembly-0.8.0-incubating-hadoop1.0.4.jar" "-Xms512M" "-Xmx512M" "org.apache.spark.executor.StandaloneExecutorBackend" "akka://spark@localhost:55641/user/StandaloneScheduler" "0" "localhost" "4" ======================================== SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.