我已经在我的3节点集群上安装了CDH5.4.7。在Spark上运行第一个作业之后,我检查了应用程序历史页面。它是这样写的
Event log directory: hdfs://****:8020/user/spark/applicationHistory
No completed applications found!
Did you specify the correct logging directory? Please verify your setting of
spark.history.fs.logDirectory and whether you have the permissions to access
it. It is also possible that your application did not run to completion or
did not stop the SparkContext.我检查了HDFS,发现/user/spark/applicationHistory已经在那里了。但那个目录里没有条目。这意味着没有写入任何日志。我搜索了cloudera文档页面,并在下面的链接中找到了文章Managing the Spark History Server
如前所述,我添加了一个星火历史服务器并启动了它。为我的用户执行以下两个命令
$ sudo -u hdfs hadoop fs -chown -R spark:spark /user/spark
$ sudo -u hdfs hadoop fs -chmod 1777 /user/spark/applicationHistory但是,当我尝试执行以下命令时,它会出现no such file or directory错误
$ cp /etc/spark/conf/spark-defaults.conf.template /etc/spark/conf/spark-defaults.conf所以,我去了path /etc/spark,列出了里面的文件。它展示了这样的东西
conf -> /etc/alternatives/spark-conf我既不能创建名为conf的dir,因为它已经存在,也不能将目录更改为/etc/spark/conf。
另外,service spark-history-server start命令会给出unrecognized service错误。
帮帮忙!提前感谢
发布于 2017-12-19 06:51:04
我在Cloudera Quickstart VM 5.12.0映像上也面临同样的问题,并能够通过以下步骤解决这个问题:
$ sudo服务火花-历史记录-服务器停止
$ sudo -u hdfs hadoop fs -chown -R火星:星星之火/用户/火花 $ sudo -u hadoop -chmod 777 /user/spark/applicationHistory
spark.eventLog.enabled=true spark.eventLog.dir=hdfs://quickstart.cloudera:8020/user/spark/applicationHistory
spark.yarn.historyServer.address=http://quickstart.cloudera:18088
$ sudo服务火花-历史记录-服务器启动
希望它对其他人有用。
https://stackoverflow.com/questions/46638803
复制相似问题