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

YARN-10754. RM Renew Delegation token thread should timeout and retry should also consider app new submitted #7297

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
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 @@ -967,12 +967,8 @@ public void run() {
}
}

DelegationTokenRenewerAppRecoverEvent event =
new DelegationTokenRenewerAppRecoverEvent(
evt.getApplicationId(), evt.getCredentials(),
evt.shouldCancelAtEnd(), evt.getUser(), evt.getTokenConf());
event.setAttempt(evt.getAttempt());
processDelegationTokenRenewerEvent(event);
evt.setAttempt(evt.getAttempt());
processDelegationTokenRenewerEvent(evt);
}
};
}
Expand Down Expand Up @@ -1022,6 +1018,16 @@ public void run() {
"Exhausted max retry attempts {} in token renewer "
+ "thread for {}",
tokenRenewerThreadRetryMaxAttempts, evt.getApplicationId());
if (evt instanceof DelegationTokenRenewerAppSubmitEvent) {
// Sending APP_REJECTED is fine, since we assume that the
// RMApp is in NEW state and thus we haven't yet informed the
// Scheduler about the existence of the application
rmContext.getDispatcher().getEventHandler().handle(
new RMAppEvent(evt.getApplicationId(),
RMAppEventType.APP_REJECTED,
"Exhausted max retry attempts in token renewer " +
"for submitted new application."));
}
}
}
} catch (Exception e) {
Expand Down Expand Up @@ -1080,13 +1086,14 @@ private void handleDTRenewerAppSubmitEvent(
.handle(new RMAppEvent(event.getApplicationId(), RMAppEventType.START));
} catch (Throwable t) {
LOG.warn(
"Unable to add the application to the delegation token renewer.",
"Unable to add the application to the delegation token renewer," +
" will retry in delegationTokenRenewerPool.",
t);
// Sending APP_REJECTED is fine, since we assume that the
// RMApp is in NEW state and thus we havne't yet informed the
// RMApp is in NEW state, and thus we haven't yet informed the
// Scheduler about the existence of the application
rmContext.getDispatcher().getEventHandler().handle(
new RMAppEvent(event.getApplicationId(),
new RMAppEvent(evt.getApplicationId(),
RMAppEventType.APP_REJECTED, t.getMessage()));
}
}
Expand Down
Loading