YARN-4392. ApplicationCreatedEvent event time resets after RM
restart/failover. Contributed by Naganarasimha G R and Xuan Gong
(cherry picked from commit 4546c7582b
)
Conflicts:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/TestRMAppTransitions.java
This commit is contained in:
parent
b7d484aead
commit
2e2dbf59d1
|
@ -335,7 +335,8 @@ public class TimelineClientImpl extends TimelineClient {
|
|||
@Override
|
||||
protected void serviceStart() throws Exception {
|
||||
timelineWriter = createTimelineWriter(
|
||||
configuration, authUgi, client, resURI);
|
||||
configuration, authUgi, client, constructResURI(getConfig(),
|
||||
getTimelineServiceAddress(), false));
|
||||
}
|
||||
|
||||
protected TimelineWriter createTimelineWriter(Configuration conf,
|
||||
|
@ -613,7 +614,8 @@ public class TimelineClientImpl extends TimelineClient {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + " with timeline server " + resURI
|
||||
return super.toString() + " with timeline server "
|
||||
+ constructResURI(getConfig(), getTimelineServiceAddress(), false)
|
||||
+ " and writer " + timelineWriter;
|
||||
}
|
||||
|
||||
|
|
|
@ -880,6 +880,8 @@ public class RMAppImpl implements RMApp, Recoverable {
|
|||
//TODO recover collector address.
|
||||
//this.collectorAddr = appState.getCollectorAddr();
|
||||
|
||||
// send the ATS create Event
|
||||
sendATSCreateEvent(this, this.startTime);
|
||||
RMAppAttemptImpl preAttempt = null;
|
||||
for (ApplicationAttemptId attemptId :
|
||||
new TreeSet<>(appState.attempts.keySet())) {
|
||||
|
@ -1861,7 +1863,7 @@ public class RMAppImpl implements RMApp, Recoverable {
|
|||
}
|
||||
return amNodeLabelExpression;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CallerContext getCallerContext() {
|
||||
return callerContext;
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
|
||||
package org.apache.hadoop.yarn.server.resourcemanager.rmapp;
|
||||
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.recovery.records.ApplicationStateData;
|
||||
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Matchers.anyLong;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
|
|
Loading…
Reference in New Issue