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