Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spark Shell stuck in YARN Accepted state

Running Spark 1.3.1 on Yarn and EMR. When I run the spark-shell everything looks normal until I start seeing messages like INFO yarn.Client: Application report for application_1439330624449_1561 (state: ACCEPTED). These messages are generated endlessly, once per second. Meanwhile, I am unable to use the Spark shell.

I don't understand why this is happening.

like image 487
DJElbow Avatar asked Sep 18 '15 18:09

DJElbow


2 Answers

Seeing (near) endless Accepted messages from YARN has always been a sure sign that there were not enough cluster resources to allocate for my Spark jobs / shell. YARN will continue trying to schedule your Spark application, but will eventually time-out if not enough resources become available in a certain amount of time.

Are you providing any command line options to spark-shell that override the defaults provided? When I ask for too many executors/cores/memory YARN will accept my request but never transition to a Running ApplicationMaster.

Try running a spark-shell with no options (other than perhaps --master yarn) and see if it gets past Accepted.

like image 181
Steven Magana-Zook Avatar answered Nov 15 '22 06:11

Steven Magana-Zook


Realized there were a couple of streaming jobs I had killed in the terminal, but I guess they were somehow still running. I was able to find these in the UI showing all running applications on YARN (I wasn't able to execute Hive queries as either). Once I killed the jobs using the command below the spark-shell started as usual.

yarn application -kill application_1428487296152_25597 
like image 33
DJElbow Avatar answered Nov 15 '22 05:11

DJElbow