Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,14 @@ private DAGStatus getDAGStatusViaAM(@Nullable Set<StatusGetOpts> statusOptions,
LOG.info("DAG is no longer running - application not found by YARN", e);
dagCompleted = true;
} catch (NoCurrentDAGException e) {
LOG.info("Got NoCurrentDAGException from AM, returning a failed DAG", e);
return dagLost();
if (conf.getBoolean(TezConfiguration.DAG_RECOVERY_ENABLED,
TezConfiguration.DAG_RECOVERY_ENABLED_DEFAULT)) {
LOG.info("Got NoCurrentDAGException from AM, going on as recovery is enabled", e);
} else {
// if recovery is disabled, we're not expecting the DAG to be finished any time in the future
LOG.info("Got NoCurrentDAGException from AM, returning a failed DAG as recovery is disabled", e);
return dagLost();
}
} catch (TezException e) {
// can be either due to a n/w issue or due to AM completed.
LOG.info("Cannot retrieve DAG Status due to TezException: {}", e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ public void testGetDagStatusWithCachedStatusExpiration() throws Exception {
@Test
public void testDagClientReturnsFailedDAGOnNoCurrentDAGException() throws Exception {
TezConfiguration tezConf = new TezConfiguration();
tezConf.setBoolean(TezConfiguration.DAG_RECOVERY_ENABLED, false);

try (DAGClientImplForTest dagClientImpl = new DAGClientImplForTest(mockAppId, dagIdStr, tezConf, null)) {

Expand Down