.convertFromLocalResources(additionalLocalResources));
}
additionalLocalResources.clear();
DAGClientAMProtocolBlockingPB proxy = null;
try {
proxy = waitForProxy();
} catch (InterruptedException e) {
throw new IOException("Interrupted while trying to create a connection to the AM", e);
}
if (proxy == null) {
try {
LOG.warn("DAG submission to session timed out, stopping session");
stop();
} catch (Throwable t) {
LOG.info("Got an exception when trying to stop session", t);
}
throw new DAGSubmissionTimedOut("Could not submit DAG to Tez Session"
+ ", timed out after " + clientTimeout + " seconds");
}
try {
SubmitDAGResponseProto response = proxy.submitDAG(null, requestBuilder.build());
// the following check is only for testing since the final class
// SubmitDAGResponseProto cannot be mocked
if (response != null) {
dagId = response.getDagId();
}