Reputation: 764
I have installed CDH 5.4.7 on my 3 node cluster. After running the first job on Spark I checked for application history page. It was written as following
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.
I checked the HDFS and found that /user/spark/applicationHistory
was already there. But there was no entry inside that directory. That means no log has been written. I searched cloudera documentation page and found the article Managing the Spark History Server
on the following link
As described I have added a Spark History Server and started it. Executed the following two commands for my user
$ sudo -u hdfs hadoop fs -chown -R spark:spark /user/spark
$ sudo -u hdfs hadoop fs -chmod 1777 /user/spark/applicationHistory
However, when I tried to execute the following command it gives no such file or directory
error
$ cp /etc/spark/conf/spark-defaults.conf.template /etc/spark/conf/spark-defaults.conf
So, I went to the path /etc/spark
and listed the files inside that. It showed something like this
conf -> /etc/alternatives/spark-conf
Neither I could create dir named conf
because it is already there nor I can change directory to /etc/spark/conf
Also service spark-history-server start
command gives unrecognized service
error.
Kindly help! Thanks in advance
Upvotes: 2
Views: 6003
Reputation: 41
I was facing the same issue on Cloudera Quickstart VM 5.12.0 image and able to sort out the issue by following below steps:
$ sudo service spark-history-server stop
$ sudo -u hdfs hadoop fs -chown -R spark:spark /user/spark
$ sudo -u hdfs hadoop fs -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 service spark-history-server start
Hope that it will be useful to others.
Upvotes: 2