Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 58C05200D20 for ; Tue, 17 Oct 2017 20:13:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 57304160BEB; Tue, 17 Oct 2017 18:13:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9FD2C160BEA for ; Tue, 17 Oct 2017 20:13:35 +0200 (CEST) Received: (qmail 18529 invoked by uid 500); 17 Oct 2017 18:13:26 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 16981 invoked by uid 99); 17 Oct 2017 18:13:25 -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; Tue, 17 Oct 2017 18:13:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3222FDFFAC; Tue, 17 Oct 2017 18:13:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: varunsaxena@apache.org To: common-commits@hadoop.apache.org Date: Tue, 17 Oct 2017 18:13:57 -0000 Message-Id: <0c7decf2450641f3b06cc53ce7cb89d9@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [34/50] [abbrv] hadoop git commit: YARN-7152. [ATSv2] Registering timeline client before AMRMClient service init throw exception (Rohith Sharma K S via Varun Saxena) archived-at: Tue, 17 Oct 2017 18:13:36 -0000 YARN-7152. [ATSv2] Registering timeline client before AMRMClient service init throw exception (Rohith Sharma K S via Varun Saxena) (cherry picked from commit ef87d34a0e96f6b6390b7086c4ea2d5b7a4c2754) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/95f45b89 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/95f45b89 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/95f45b89 Branch: refs/heads/branch-2 Commit: 95f45b89d12fb3d2b3df5fb55545ec808f950471 Parents: b3201b2 Author: Varun Saxena Authored: Mon Sep 4 20:11:02 2017 +0530 Committer: Varun Saxena Committed: Tue Oct 17 23:36:40 2017 +0530 ---------------------------------------------------------------------- .../hadoop/yarn/client/api/AMRMClient.java | 22 ++------------------ 1 file changed, 2 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/95f45b89/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java index 70f19ba..b8eb58c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java @@ -28,7 +28,6 @@ import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceAudience.Private; import org.apache.hadoop.classification.InterfaceAudience.Public; import org.apache.hadoop.classification.InterfaceStability; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.service.AbstractService; import org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse; import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse; @@ -42,7 +41,6 @@ import org.apache.hadoop.yarn.api.records.Priority; import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.api.records.UpdateContainerRequest; import org.apache.hadoop.yarn.client.api.impl.AMRMClientImpl; -import org.apache.hadoop.yarn.conf.YarnConfiguration; import org.apache.hadoop.yarn.exceptions.YarnException; import com.google.common.base.Preconditions; @@ -57,7 +55,6 @@ public abstract class AMRMClient extends private static final Log LOG = LogFactory.getLog(AMRMClient.class); private TimelineV2Client timelineV2Client; - private boolean timelineServiceV2Enabled; /** * Create a new instance of AMRMClient. @@ -82,12 +79,6 @@ public abstract class AMRMClient extends nmTokenCache = NMTokenCache.getSingleton(); } - @Override - protected void serviceInit(Configuration conf) throws Exception { - super.serviceInit(conf); - timelineServiceV2Enabled = YarnConfiguration.timelineServiceV2Enabled(conf); - } - /** * Object to represent a single container request for resources. Scheduler * documentation should be consulted for the specifics of how the parameters @@ -696,18 +687,9 @@ public abstract class AMRMClient extends * V2 client will be updated dynamically if registered. * * @param client the timeline v2 client to register - * @throws YarnException when this method is invoked even when ATS V2 is not - * configured. */ - public void registerTimelineV2Client(TimelineV2Client client) - throws YarnException { - if (timelineServiceV2Enabled) { - timelineV2Client = client; - } else { - LOG.error("Trying to register timeline v2 client when not configured."); - throw new YarnException( - "register timeline v2 client when not configured."); - } + public void registerTimelineV2Client(TimelineV2Client client) { + timelineV2Client = client; } /** --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org