Details
Description
People submit spark job inside their application to yarn cluster using spark yarn client, and it's not desirable to call System.exit in yarn client which will terminate the parent application as well.
We should throw exception instead, and people can determine which action they want to take given the exception.