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
|
@Override
|
||||||
protected void serviceStart() throws Exception {
|
protected void serviceStart() throws Exception {
|
||||||
timelineWriter = createTimelineWriter(
|
timelineWriter = createTimelineWriter(
|
||||||
configuration, authUgi, client, resURI);
|
configuration, authUgi, client, constructResURI(getConfig(),
|
||||||
|
getTimelineServiceAddress(), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TimelineWriter createTimelineWriter(Configuration conf,
|
protected TimelineWriter createTimelineWriter(Configuration conf,
|
||||||
|
@ -613,7 +614,8 @@ public class TimelineClientImpl extends TimelineClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return super.toString() + " with timeline server " + resURI
|
return super.toString() + " with timeline server "
|
||||||
|
+ constructResURI(getConfig(), getTimelineServiceAddress(), false)
|
||||||
+ " and writer " + timelineWriter;
|
+ " and writer " + timelineWriter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -880,6 +880,8 @@ public class RMAppImpl implements RMApp, Recoverable {
|
||||||
//TODO recover collector address.
|
//TODO recover collector address.
|
||||||
//this.collectorAddr = appState.getCollectorAddr();
|
//this.collectorAddr = appState.getCollectorAddr();
|
||||||
|
|
||||||
|
// send the ATS create Event
|
||||||
|
sendATSCreateEvent(this, this.startTime);
|
||||||
RMAppAttemptImpl preAttempt = null;
|
RMAppAttemptImpl preAttempt = null;
|
||||||
for (ApplicationAttemptId attemptId :
|
for (ApplicationAttemptId attemptId :
|
||||||
new TreeSet<>(appState.attempts.keySet())) {
|
new TreeSet<>(appState.attempts.keySet())) {
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.rmapp;
|
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.any;
|
||||||
import static org.mockito.Matchers.anyLong;
|
import static org.mockito.Matchers.anyLong;
|
||||||
import static org.mockito.Mockito.doReturn;
|
import static org.mockito.Mockito.doReturn;
|
||||||
|
|
Loading…
Reference in New Issue