From yarn-issues-return-144473-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Tue May 8 19:39:07 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 6ACBA18063B for ; Tue, 8 May 2018 19:39:06 +0200 (CEST) Received: (qmail 5293 invoked by uid 500); 8 May 2018 17:39:05 -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 5281 invoked by uid 99); 8 May 2018 17:39:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2018 17:39:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EDB5B18153D for ; Tue, 8 May 2018 17:39:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id se5m8VCnF-S8 for ; Tue, 8 May 2018 17:39:03 +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 DBFA35F1F3 for ; Tue, 8 May 2018 17:39:02 +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 7B824E12F2 for ; Tue, 8 May 2018 17:39:02 +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 AB885212BA for ; Tue, 8 May 2018 17:39:00 +0000 (UTC) Date: Tue, 8 May 2018 17:39:00 +0000 (UTC) From: "Robert Kanter (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-8202) DefaultAMSProcessor should properly check units of requested custom resource types against minimum/maximum allocation 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-8202?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16467= 731#comment-16467731 ]=20 Robert Kanter commented on YARN-8202: ------------------------------------- Thanks for the patch. A few comments: # Why is {{TestResourceRequest}} necessary? Can't we just directly use {{R= esource}}? =20 # I don't think we need to make the variables ALL CAPS in {{RMContainerAllo= cator}}. While these are final, they're lists and we usually only do ALL C= APS for "real" constants (e.g. Strings, ints, etc). # In {{UnitsConversionUtil#checkUnitArgument}}, the check for a null unit a= lso unnecessarily checks that the unit is known, which is then repeated in = the second if statement. As it is now (and the original code suffered the = same issue), it's going to throw a message saying the unit is null for an u= nknown unit. We should remove the unknown unit check from the first if sta= tement. # In {{ResourceTypesTestHelper}}, we should make the {{Pattern}} a static c= lass variable, so we don't have to "compile" it everytime the method is cal= led. # In {{SchedulerUtils#checkResourceRequestAgainstAvailableResource}}, when = doing the debug logging, we should call {{LOG.isDebugEnabled()}} first so w= e avoid doing String concatenation if debug logging is not turned on. > DefaultAMSProcessor should properly check units of requested custom resou= rce types against minimum/maximum allocation > -------------------------------------------------------------------------= -------------------------------------------- > > Key: YARN-8202 > URL: https://issues.apache.org/jira/browse/YARN-8202 > Project: Hadoop YARN > Issue Type: Bug > Reporter: Szilard Nemeth > Assignee: Szilard Nemeth > Priority: Blocker > Attachments: YARN-8202-001.patch, YARN-8202-002.patch, YARN-8202-= 003.patch, YARN-8202-004.patch, YARN-8202-005.patch, YARN-8202-006.patch, Y= ARN-8202-007.patch, YARN-8202-008.patch > > > =C2=A0 > When I execute a pi job with arguments:=C2=A0 > {code:java} > -Dmapreduce.map.resource.memory-mb=3D200 -Dmapreduce.map.resource.resourc= e1=3D500M 1 1000{code} > and I have one node with 5GB of resource1, I get the following exception = on every second and the job hangs: > {code:java} > 2018-04-24 08:42:03,694 INFO org.apache.hadoop.ipc.Server: IPC Server han= dler 20 on 8030, call Call#386 Retry#0 org.apache.hadoop.yarn.api.Applicati= onMasterProtocolPB.allocate from 172.31.119.172:58138 > org.apache.hadoop.yarn.exceptions.InvalidResourceRequestException: Invali= d resource request, requested resource type=3D[resource1] < 0 or greater th= an maximum allowed allocation. Requested resource=3D, maximum allowed allocation=3D, please note that maximum allowed allocation is calculated by sc= heduler based on maximum resource of registered NodeManagers, which might b= e less than configured maximum allocation=3D > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.yarn.server.resourcemana= ger.scheduler.SchedulerUtils.validateResourceRequest(SchedulerUtils.java:28= 6) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.yarn.server.resourcemana= ger.scheduler.SchedulerUtils.normalizeAndValidateRequest(SchedulerUtils.jav= a:242) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.yarn.server.resourcemana= ger.scheduler.SchedulerUtils.normalizeAndvalidateRequest(SchedulerUtils.jav= a:258) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.yarn.server.resourcemana= ger.RMServerUtils.normalizeAndValidateRequests(RMServerUtils.java:249) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.yarn.server.resourcemana= ger.DefaultAMSProcessor.allocate(DefaultAMSProcessor.java:230) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.yarn.server.resourcemana= ger.scheduler.constraint.processor.DisabledPlacementProcessor.allocate(Disa= bledPlacementProcessor.java:75) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.yarn.server.resourcemana= ger.AMSProcessingChain.allocate(AMSProcessingChain.java:92) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.yarn.server.resourcemana= ger.ApplicationMasterService.allocate(ApplicationMasterService.java:433) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.yarn.api.impl.pb.service= .ApplicationMasterProtocolPBServiceImpl.allocate(ApplicationMasterProtocolP= BServiceImpl.java:60) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.yarn.proto.ApplicationMa= sterProtocol$ApplicationMasterProtocolService$2.callBlockingMethod(Applicat= ionMasterProtocol.java:99) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.ipc.ProtobufRpcEngine$Se= rver$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:523) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.ipc.RPC$Server.call(RPC.= java:991) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.ipc.Server$RpcCall.run(S= erver.java:872) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.ipc.Server$RpcCall.run(S= erver.java:818) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.security.AccessController.doPrivilege= d(Native Method) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at javax.security.auth.Subject.doAs(Subject.j= ava:422) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.security.UserGroupInform= ation.doAs(UserGroupInformation.java:1682) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hadoop.ipc.Server$Handler.run(S= erver.java:2678) > {code} > *This is because=C2=A0org.apache.hadoop.yarn.server.resourcemanager.sched= uler.SchedulerUtils#validateResourceRequest does not take resource units in= to account.* > =C2=A0 > However, if I start a job with arguments:=C2=A0 > {code:java} > -Dmapreduce.map.resource.memory-mb=3D200 -Dmapreduce.map.resource.resourc= e1=3D1G 1 1000{code} > and I still have 5GB of resource1 on one node then the job runs successfu= lly. > =C2=A0 > I also tried a third=C2=A0job run, when I request 1GB of resource1 and I = have no nodes with any amount of resource1, then I restart the node with 5G= Bs of resource1, the job ultimately completes, but just after the node with= enough resources registered in RM, which is the desired behaviour. > =C2=A0 -- 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