Description
Currently, short of contacting the RM directly, there doesn't seem to be a way to figure out why a DAGClient cannot be obtained. If a YARN app goes into an error state - TezClient should throw an exception to indicate the same.
Also, the TezClient should wait for an application to reach the RUNNING state before returning a null. Client side code should not be expected to loop.