YARN-8616. systemClock should be used in RMAppImpl instead of System.currentTimeMills(), to be consistent. (Contributed by Szilard Nemeth)
This commit is contained in:
parent
cf62ff9a6a
commit
29dad7d258
@ -1507,7 +1507,7 @@ public FinalTransition(RMAppState finalState) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void transition(RMAppImpl app, RMAppEvent event) {
|
public void transition(RMAppImpl app, RMAppEvent event) {
|
||||||
app.logAggregationStartTime = System.currentTimeMillis();
|
app.logAggregationStartTime = app.systemClock.getTime();
|
||||||
for (NodeId nodeId : app.getRanNodes()) {
|
for (NodeId nodeId : app.getRanNodes()) {
|
||||||
app.handler.handle(
|
app.handler.handle(
|
||||||
new RMNodeCleanAppEvent(nodeId, app.applicationId));
|
new RMNodeCleanAppEvent(nodeId, app.applicationId));
|
||||||
@ -1767,7 +1767,7 @@ public Map<NodeId, LogAggregationReport> getLogAggregationReportsForApp() {
|
|||||||
try {
|
try {
|
||||||
this.readLock.lock();
|
this.readLock.lock();
|
||||||
if (!isLogAggregationFinished() && isAppInFinalState(this) &&
|
if (!isLogAggregationFinished() && isAppInFinalState(this) &&
|
||||||
System.currentTimeMillis() > this.logAggregationStartTime
|
systemClock.getTime() > this.logAggregationStartTime
|
||||||
+ this.logAggregationStatusTimeout) {
|
+ this.logAggregationStatusTimeout) {
|
||||||
for (Entry<NodeId, LogAggregationReport> output :
|
for (Entry<NodeId, LogAggregationReport> output :
|
||||||
logAggregationStatus.entrySet()) {
|
logAggregationStatus.entrySet()) {
|
||||||
@ -2060,7 +2060,7 @@ private void sendATSCreateEvent() {
|
|||||||
String appViewACLs = submissionContext.getAMContainerSpec()
|
String appViewACLs = submissionContext.getAMContainerSpec()
|
||||||
.getApplicationACLs().get(ApplicationAccessType.VIEW_APP);
|
.getApplicationACLs().get(ApplicationAccessType.VIEW_APP);
|
||||||
rmContext.getSystemMetricsPublisher().appACLsUpdated(
|
rmContext.getSystemMetricsPublisher().appACLsUpdated(
|
||||||
this, appViewACLs, System.currentTimeMillis());
|
this, appViewACLs, systemClock.getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Private
|
@Private
|
||||||
|
Loading…
Reference in New Issue
Block a user