From yarn-issues-return-140957-apmail-hadoop-yarn-issues-archive=hadoop.apache.org@hadoop.apache.org Thu Mar 29 06:28:03 2018 Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA23B18617 for ; Thu, 29 Mar 2018 06:28:03 +0000 (UTC) Received: (qmail 35081 invoked by uid 500); 29 Mar 2018 06:28:03 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 35026 invoked by uid 500); 29 Mar 2018 06:28:03 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 35012 invoked by uid 99); 29 Mar 2018 06:28:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2018 06:28:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E105F1A1676 for ; Thu, 29 Mar 2018 06:28:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -101.511 X-Spam-Level: X-Spam-Status: No, score=-101.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 0Gm9XoZSFSZW for ; Thu, 29 Mar 2018 06:28:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id B324C5F254 for ; Thu, 29 Mar 2018 06:28:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E6BEBE02F0 for ; Thu, 29 Mar 2018 06:28:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 20560255EB for ; Thu, 29 Mar 2018 06:28:00 +0000 (UTC) Date: Thu, 29 Mar 2018 06:28:00 +0000 (UTC) From: "Rohith Sharma K S (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-8085) RMContext#resourceProfilesManager is lost after RM went standby then back to active MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-8085?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16418= 494#comment-16418494 ]=20 Rohith Sharma K S commented on YARN-8085: ----------------------------------------- thanks [~Tao Yang] for the patch! It is a blocker for 3.1.0. Regarding the patch, we have clear separation of alwaysOnService vs activeS= erviceContext. ResourceProfilesManager should be part of active service con= text because activeServiceContext context is refreshed for every transitio= n. I see that profiles are loaded during service initialization. If it get = added into serviceContext, then profiles are NOT refreshed which get stale = profile information. cc :/ [~sunilg] > RMContext#resourceProfilesManager is lost after RM went standby then back= to active > -------------------------------------------------------------------------= ---------- > > Key: YARN-8085 > URL: https://issues.apache.org/jira/browse/YARN-8085 > Project: Hadoop YARN > Issue Type: Bug > Components: capacityscheduler > Affects Versions: 3.1.0 > Reporter: Tao Yang > Assignee: Tao Yang > Priority: Major > Attachments: YARN-8085.001.patch, YARN-8085.002.patch > > > We submited a distributed shell application=C2=A0after=C2=A0RM failover a= nd back to active, then got NPE error in RM log: > {noformat} > java.lang.NullPointerException > at org.apache.hadoop.yarn.server.resourcemanager.ClientRMService.= getResourceProfiles(ClientRMService.java:1814) > at org.apache.hadoop.yarn.api.impl.pb.service.ApplicationClientPr= otocolPBServiceImpl.getResourceProfiles(ApplicationClientProtocolPBServiceI= mpl.java:657) > at org.apache.hadoop.yarn.proto.ApplicationClientProtocol$Applica= tionClientProtocolService$2.callBlockingMethod(ApplicationClientProtocol.ja= va:617) > at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvo= ker.call(ProtobufRpcEngine.java:523) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:991) > at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:869) > at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:815) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroup= Information.java:1682) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2675) > {noformat} > The cause is that currently resourceProfilesManager is not transferred to= new RMContext instance in RMContext#resetRMContext. We should do this tran= sfer to fix this error. > {code:java} > @@ -1488,6 +1488,10 @@ private void resetRMContext() { > // transfer service context to new RM service Context > rmContextImpl.setServiceContext(rmContext.getServiceContext()); > + // transfer resource profiles manager > + rmContextImpl > + .setResourceProfilesManager(rmContext.getResourceProfilesManager= ()); > + > // reset dispatcher > Dispatcher dispatcher =3D setupDispatcher(); > ((Service) dispatcher).init(this.conf); > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org