在Ambari上运行一个火花工作

时间:2018-06-11 20:46:58

标签: apache-spark ambari

我设置了Ambari主人,并在另一台Linux机器上设置了一个Ambari代理。我试图通过它来完成我的火花工作,我一定是做错了。得到一个错误,不知道是什么告诉我,但不是过于确定我甚至在第一时间是令人兴奋的。我在做什么:

IP地址1.1.1.1具有ambari-server启动 IP地址1.1.1.2具有ambari-agent start

我通过网络界面设置了ambari,确保一切都已启动,安装/设置完成在ambari上。然后在1.1.1.2上我告诉系统使用Spark2:

 export SPARK_MAJOR_VERSION=2

然后我刚刚在1.1.1.2上执行了我的火花工作:

spark-submit --class Change_Score --master yarn-client --num-executors 3 --driver-memory 512m --executor-memory 512m --executor-cores 1 PSGApp-assembly-1.0.jar /home/data/data3/ /home/data/data3/dropbox/

基本上启动作业并为其提供输入文件夹。

得到这个作为回应: 不确定错误是什么告诉我的?

18/06/11 19:25:16 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!
18/06/11 19:25:16 INFO SparkContext: Successfully stopped SparkContext
18/06/11 19:25:17 ERROR SparkContext: Error initializing SparkContext.
java.lang.IllegalArgumentException: requirement failed: Can only call getServletHandlers on a running MetricsSystem
    at scala.Predef$.require(Predef.scala:224)
    at org.apache.spark.metrics.MetricsSystem.getServletHandlers(MetricsSystem.scala:91)
    at org.apache.spark.SparkContext.<init>(SparkContext.scala:515)
    at Change_Score$.<init>(st_magellan_submit.scala:94)
    at Change_Score$.<clinit>(st_magellan_submit.scala)
    at Change_Score.main(st_magellan_submit.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
    at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:906)
    at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:197)
    at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:227)
    at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:136)
    at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
18/06/11 19:25:17 INFO SparkContext: SparkContext already stopped.
Exception in thread "main" java.lang.ExceptionInInitializerError
    at Change_Score.main(st_magellan_submit.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
    at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:906)
    at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:197)
    at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:227)
    at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:136)
    at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.IllegalArgumentException: requirement failed: Can only call getServletHandlers on a running MetricsSystem
    at scala.Predef$.require(Predef.scala:224)
    at org.apache.spark.metrics.MetricsSystem.getServletHandlers(MetricsSystem.scala:91)
    at org.apache.spark.SparkContext.<init>(SparkContext.scala:515)
    at Change_Score$.<init>(st_magellan_submit.scala:94)
    at Change_Score$.<clinit>(st_magellan_submit.scala)
    ... 11 more
18/06/11 19:25:17 INFO ShutdownHookManager: Shutdown hook called
18/06/11 19:25:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-d119f9ef-bfeb-48bf-a0a8-d4826c61cd40
18/06/11 19:25:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-a305c507-839f-4cdb-9c2a-6ced02d1dc06

Ambari WEB UI显示了什么? (这些都不是强大的机器,只是为了测试) Ambari YARN UI

Ambari HDFS ui

0 个答案:

没有答案