I am facing the same things.
YarnClientClusterScheduler: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient memory
I cant see any config for worker in my CM. I am using CDH 5.3.3 and CM 5.4.0
You would I would recommend that you always start a new thread for an issue you have. Specially if the old thread is marked as answered.
There is a high probability that we will miss your question if you use the same thread.
For the issue you are seeing: check the settings in YARN as per the tuning guide and make sure that the request you make from Spark is smaller than the maximum container size you can accomodate. Also keep in mind you need 1 extra container on top of the executors for the YARN AM (which can also host the driver when you use deploymeode cluster.
I have seperated this out into a new thread for you both. :)