YARN-2627. Added the info logs of attemptFailuresValidityInterval and number of previous failed attempts. Contributed by Xuan Gong.
This commit is contained in:
parent
f7743dd07d
commit
9582a50176
@ -280,6 +280,9 @@ Release 2.6.0 - UNRELEASED
|
|||||||
YARN-1769. CapacityScheduler: Improve reservations (Thomas Graves via
|
YARN-1769. CapacityScheduler: Improve reservations (Thomas Graves via
|
||||||
jlowe)
|
jlowe)
|
||||||
|
|
||||||
|
YARN-2627. Added the info logs of attemptFailuresValidityInterval and number
|
||||||
|
of previous failed attempts. (Xuan Gong via zjshen)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
@ -376,6 +376,11 @@ public RMAppImpl(ApplicationId applicationId, RMContext rmContext,
|
|||||||
|
|
||||||
this.attemptFailuresValidityInterval =
|
this.attemptFailuresValidityInterval =
|
||||||
submissionContext.getAttemptFailuresValidityInterval();
|
submissionContext.getAttemptFailuresValidityInterval();
|
||||||
|
if (this.attemptFailuresValidityInterval > 0) {
|
||||||
|
LOG.info("The attemptFailuresValidityInterval for the application: "
|
||||||
|
+ this.applicationId + " is " + this.attemptFailuresValidityInterval
|
||||||
|
+ ".");
|
||||||
|
}
|
||||||
|
|
||||||
ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
|
ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
|
||||||
this.readLock = lock.readLock();
|
this.readLock = lock.readLock();
|
||||||
@ -1179,6 +1184,11 @@ public AttemptFailedTransition(RMAppState initialState) {
|
|||||||
@Override
|
@Override
|
||||||
public RMAppState transition(RMAppImpl app, RMAppEvent event) {
|
public RMAppState transition(RMAppImpl app, RMAppEvent event) {
|
||||||
int numberOfFailure = app.getNumFailedAppAttempts();
|
int numberOfFailure = app.getNumFailedAppAttempts();
|
||||||
|
LOG.info("The number of failed attempts"
|
||||||
|
+ (app.attemptFailuresValidityInterval > 0 ? " in previous "
|
||||||
|
+ app.attemptFailuresValidityInterval + " milliseconds " : " ")
|
||||||
|
+ "is " + numberOfFailure + ". The max attempts is "
|
||||||
|
+ app.maxAppAttempts);
|
||||||
if (!app.submissionContext.getUnmanagedAM()
|
if (!app.submissionContext.getUnmanagedAM()
|
||||||
&& numberOfFailure < app.maxAppAttempts) {
|
&& numberOfFailure < app.maxAppAttempts) {
|
||||||
boolean transferStateFromPreviousAttempt;
|
boolean transferStateFromPreviousAttempt;
|
||||||
@ -1293,4 +1303,5 @@ public RMAppMetrics getRMAppMetrics() {
|
|||||||
public void setSystemClock(Clock clock) {
|
public void setSystemClock(Clock clock) {
|
||||||
this.systemClock = clock;
|
this.systemClock = clock;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user