Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Pyspark stuck at Stage 0

avatar
Explorer

Hi all

 

I installed Cloudera 5.5 and Spark YARN. I uploaded a small file as below:

 

Screen Shot 2015-12-09 at 10.27.23 AM.png

 

Then I ran pyspark as hdfs user and did a simple exercise but it got stuck at Stage 0 as screenshot:

 

Screen Shot 2015-12-09 at 10.30.39 AM.png

 

 

It never returned anything. Can someone point me out a way to troubleshoot and fix this? 

1 ACCEPTED SOLUTION

avatar
Mentor
What is your NodeManager configuration's yarn.nodemanager.resource.memory-mb value set to?

Its possible that YARN is unable to allocate a container for the executors, due to too low value of that configuration, in which case things could hang this way. You could raise that config by another 1 GB and restart the cluster/re-run the shell to see if it resolves the issue.

You can also check the Spark AM's log (visit your RM Web UI and click through the RUNNING Spark application, and click on the "logs" link for its Application Master). It may show what it is stuck on, if its yet to spawn up an executor, or if its something else.

View solution in original post

2 REPLIES 2

avatar
Mentor
What is your NodeManager configuration's yarn.nodemanager.resource.memory-mb value set to?

Its possible that YARN is unable to allocate a container for the executors, due to too low value of that configuration, in which case things could hang this way. You could raise that config by another 1 GB and restart the cluster/re-run the shell to see if it resolves the issue.

You can also check the Spark AM's log (visit your RM Web UI and click through the RUNNING Spark application, and click on the "logs" link for its Application Master). It may show what it is stuck on, if its yet to spawn up an executor, or if its something else.

avatar
Explorer

I found out my YARN deployment got messed up because I didn't add more NodeManager in after I added new hosts manually. Ops!