Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEZ-4559: Fix Retry logic in case of Recovery #353

Merged
merged 1 commit into from
May 7, 2024
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
Loading