YARN-4608. Redundant code statement in WritingYarnApplications. Contributed by Kai Sasaki.
This commit is contained in:
parent
4992398aee
commit
3ac9511da2
|
@ -1295,6 +1295,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
YARN-4557. Fix improper Queues sorting in PartitionedQueueComparator
|
YARN-4557. Fix improper Queues sorting in PartitionedQueueComparator
|
||||||
when accessible-node-labels=*. (Naganarasimha G R via wangda)
|
when accessible-node-labels=*. (Naganarasimha G R via wangda)
|
||||||
|
|
||||||
|
YARN-4608. Redundant code statement in WritingYarnApplications.
|
||||||
|
(Kai Sasaki via aajisaka)
|
||||||
|
|
||||||
Release 2.7.3 - UNRELEASED
|
Release 2.7.3 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -208,7 +208,7 @@ if (debugFlag) {
|
||||||
vargs.add("1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/AppMaster.stdout");
|
vargs.add("1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/AppMaster.stdout");
|
||||||
vargs.add("2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/AppMaster.stderr");
|
vargs.add("2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/AppMaster.stderr");
|
||||||
|
|
||||||
// Get final commmand
|
// Get final command
|
||||||
StringBuilder command = new StringBuilder();
|
StringBuilder command = new StringBuilder();
|
||||||
for (CharSequence str : vargs) {
|
for (CharSequence str : vargs) {
|
||||||
command.append(str).append(" ");
|
command.append(str).append(" ");
|
||||||
|
@ -339,7 +339,7 @@ ApplicationAttemptId appAttemptID = containerId.getApplicationAttemptId();
|
||||||
nmClientAsync.start();
|
nmClientAsync.start();
|
||||||
```
|
```
|
||||||
|
|
||||||
* The AM has to emit heartbeats to the RM to keep it informed that the AM is alive and still running. The timeout expiry interval at the RM is defined by a config setting accessible via `YarnConfiguration.RM_AM_EXPIRY_INTERVAL_MS` with the default being defined by `YarnConfiguration.DEFAULT_RM_AM_EXPIRY_INTERVAL_MS`. The ApplicationMaster needs to register itself with the ResourceManager to start hearbeating.
|
* The AM has to emit heartbeats to the RM to keep it informed that the AM is alive and still running. The timeout expiry interval at the RM is defined by a config setting accessible via `YarnConfiguration.RM_AM_EXPIRY_INTERVAL_MS` with the default being defined by `YarnConfiguration.DEFAULT_RM_AM_EXPIRY_INTERVAL_MS`. The ApplicationMaster needs to register itself with the ResourceManager to start heartbeating.
|
||||||
|
|
||||||
```java
|
```java
|
||||||
// Register self with ResourceManager
|
// Register self with ResourceManager
|
||||||
|
@ -384,8 +384,6 @@ LOG.info("Received " + previousAMRunningContainers.size()
|
||||||
* Based on the task requirements, the AM can ask for a set of containers to run its tasks on. We can now calculate how many containers we need, and request those many containers.
|
* Based on the task requirements, the AM can ask for a set of containers to run its tasks on. We can now calculate how many containers we need, and request those many containers.
|
||||||
|
|
||||||
```java
|
```java
|
||||||
List<Container> previousAMRunningContainers =
|
|
||||||
response.getContainersFromPreviousAttempts();
|
|
||||||
List<Container> previousAMRunningContainers =
|
List<Container> previousAMRunningContainers =
|
||||||
response.getContainersFromPreviousAttempts();
|
response.getContainersFromPreviousAttempts();
|
||||||
LOG.info("Received " + previousAMRunningContainers.size()
|
LOG.info("Received " + previousAMRunningContainers.size()
|
||||||
|
@ -486,7 +484,7 @@ vargs.add(shellArgs);
|
||||||
vargs.add("1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout");
|
vargs.add("1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout");
|
||||||
vargs.add("2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stderr");
|
vargs.add("2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stderr");
|
||||||
|
|
||||||
// Get final commmand
|
// Get final command
|
||||||
StringBuilder command = new StringBuilder();
|
StringBuilder command = new StringBuilder();
|
||||||
for (CharSequence str : vargs) {
|
for (CharSequence str : vargs) {
|
||||||
command.append(str).append(" ");
|
command.append(str).append(" ");
|
||||||
|
|
Loading…
Reference in New Issue