YARN-9168. DistributedShell client timeout should be -1 by default. Contributed by Zhankun Tang.
This commit is contained in:
parent
a5eb7ce651
commit
6cec90653d
|
@ -1131,14 +1131,17 @@ public class Client {
|
||||||
+ " YarnState=" + state.toString() + ", DSFinalStatus=" + dsStatus.toString()
|
+ " YarnState=" + state.toString() + ", DSFinalStatus=" + dsStatus.toString()
|
||||||
+ ". Breaking monitoring loop");
|
+ ". Breaking monitoring loop");
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
if (System.currentTimeMillis() > (clientStartTime + clientTimeout)) {
|
|
||||||
LOG.info("Reached client specified timeout for application. Killing application");
|
|
||||||
forceKillApplication(appId);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// The value equal or less than 0 means no timeout
|
||||||
|
if (clientTimeout > 0
|
||||||
|
&& System.currentTimeMillis() > (clientStartTime + clientTimeout)) {
|
||||||
|
LOG.info("Reached client specified timeout for application. " +
|
||||||
|
"Killing application");
|
||||||
|
forceKillApplication(appId);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue