YARN-2355. MAX_APP_ATTEMPTS_ENV may no longer be a useful env var for a container (Darrell Taylor via aw)
This commit is contained in:
parent
4d8fb8c19c
commit
d6e3164d4a
|
@ -48,6 +48,9 @@ Trunk - Unreleased
|
|||
YARN-2428. LCE default banned user list should have yarn (Varun
|
||||
Saxena via aw)
|
||||
|
||||
YARN-2355. MAX_APP_ATTEMPTS_ENV may no longer be a useful env var
|
||||
for a container (Darrell Taylor via aw)
|
||||
|
||||
Release 2.8.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -98,12 +98,6 @@ public interface ApplicationConstants {
|
|||
|
||||
public static final String STDOUT = "stdout";
|
||||
|
||||
/**
|
||||
* The environment variable for MAX_APP_ATTEMPTS. Set in AppMaster environment
|
||||
* only
|
||||
*/
|
||||
public static final String MAX_APP_ATTEMPTS_ENV = "MAX_APP_ATTEMPTS";
|
||||
|
||||
/**
|
||||
* Environment for Applications.
|
||||
*
|
||||
|
|
|
@ -209,7 +209,7 @@ public class AMLauncher implements Runnable {
|
|||
Map<String, String> environment = container.getEnvironment();
|
||||
environment.put(ApplicationConstants.APPLICATION_WEB_PROXY_BASE_ENV,
|
||||
application.getWebProxyBase());
|
||||
// Set AppSubmitTime and MaxAppAttempts to be consumable by the AM.
|
||||
// Set AppSubmitTime to be consumable by the AM.
|
||||
ApplicationId applicationId =
|
||||
application.getAppAttemptId().getApplicationId();
|
||||
environment.put(
|
||||
|
@ -217,9 +217,6 @@ public class AMLauncher implements Runnable {
|
|||
String.valueOf(rmContext.getRMApps()
|
||||
.get(applicationId)
|
||||
.getSubmitTime()));
|
||||
environment.put(ApplicationConstants.MAX_APP_ATTEMPTS_ENV,
|
||||
String.valueOf(rmContext.getRMApps().get(
|
||||
applicationId).getMaxAppAttempts()));
|
||||
|
||||
Credentials credentials = new Credentials();
|
||||
DataInputByteBuffer dibb = new DataInputByteBuffer();
|
||||
|
|
|
@ -107,8 +107,7 @@ public class TestApplicationMasterLauncher {
|
|||
nmHostAtContainerManager = tokenId.getNmHostAddress();
|
||||
submitTimeAtContainerManager =
|
||||
Long.parseLong(env.get(ApplicationConstants.APP_SUBMIT_TIME_ENV));
|
||||
maxAppAttempts =
|
||||
Integer.parseInt(env.get(ApplicationConstants.MAX_APP_ATTEMPTS_ENV));
|
||||
maxAppAttempts = YarnConfiguration.DEFAULT_RM_AM_MAX_ATTEMPTS;
|
||||
return StartContainersResponse.newInstance(
|
||||
new HashMap<String, ByteBuffer>(), new ArrayList<ContainerId>(),
|
||||
new HashMap<ContainerId, SerializedException>());
|
||||
|
|
Loading…
Reference in New Issue