Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B65BF18BA9 for ; Mon, 25 Jan 2016 17:25:54 +0000 (UTC) Received: (qmail 53554 invoked by uid 500); 25 Jan 2016 17:25:38 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 51940 invoked by uid 500); 25 Jan 2016 17:25:38 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 49851 invoked by uid 99); 25 Jan 2016 17:25:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jan 2016 17:25:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AC08AE0B4C; Mon, 25 Jan 2016 17:25:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kasha@apache.org To: common-commits@hadoop.apache.org Date: Mon, 25 Jan 2016 17:25:51 -0000 Message-Id: <3ae2b83b840f464b93d037895d165491@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [16/50] [abbrv] hadoop git commit: YARN-4608. Redundant code statement in WritingYarnApplications. Contributed by Kai Sasaki. YARN-4608. Redundant code statement in WritingYarnApplications. Contributed by Kai Sasaki. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/3ac9511d Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/3ac9511d Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/3ac9511d Branch: refs/heads/YARN-1011 Commit: 3ac9511da2c0ac815d96713aec099fa87daef648 Parents: 4992398 Author: Akira Ajisaka Authored: Fri Jan 22 02:13:02 2016 +0900 Committer: Akira Ajisaka Committed: Fri Jan 22 02:14:31 2016 +0900 ---------------------------------------------------------------------- hadoop-yarn-project/CHANGES.txt | 3 +++ .../src/site/markdown/WritingYarnApplications.md | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/3ac9511d/hadoop-yarn-project/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 4cbf1a8..ca89b32 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -1295,6 +1295,9 @@ Release 2.8.0 - UNRELEASED YARN-4557. Fix improper Queues sorting in PartitionedQueueComparator 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 INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/3ac9511d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/WritingYarnApplications.md ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/WritingYarnApplications.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/WritingYarnApplications.md index d5a7a17..1aaec18 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/WritingYarnApplications.md +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/WritingYarnApplications.md @@ -208,7 +208,7 @@ if (debugFlag) { vargs.add("1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/AppMaster.stdout"); vargs.add("2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/AppMaster.stderr"); -// Get final commmand +// Get final command StringBuilder command = new StringBuilder(); for (CharSequence str : vargs) { command.append(str).append(" "); @@ -339,7 +339,7 @@ ApplicationAttemptId appAttemptID = containerId.getApplicationAttemptId(); 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 // Register self with ResourceManager @@ -386,8 +386,6 @@ LOG.info("Received " + previousAMRunningContainers.size() ```java List previousAMRunningContainers = response.getContainersFromPreviousAttempts(); -List previousAMRunningContainers = - response.getContainersFromPreviousAttempts(); LOG.info("Received " + previousAMRunningContainers.size() + " previous AM's running containers on AM registration."); @@ -486,7 +484,7 @@ vargs.add(shellArgs); vargs.add("1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout"); vargs.add("2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stderr"); -// Get final commmand +// Get final command StringBuilder command = new StringBuilder(); for (CharSequence str : vargs) { command.append(str).append(" ");