From yarn-dev-return-8873-apmail-hadoop-yarn-dev-archive=hadoop.apache.org@hadoop.apache.org Sun Jul 20 02:45:50 2014 Return-Path: X-Original-To: apmail-hadoop-yarn-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D358311B48 for ; Sun, 20 Jul 2014 02:45:50 +0000 (UTC) Received: (qmail 29050 invoked by uid 500); 20 Jul 2014 02:45:49 -0000 Delivered-To: apmail-hadoop-yarn-dev-archive@hadoop.apache.org Received: (qmail 28983 invoked by uid 500); 20 Jul 2014 02:45:49 -0000 Mailing-List: contact yarn-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-dev@hadoop.apache.org Delivered-To: mailing list yarn-dev@hadoop.apache.org Received: (qmail 28969 invoked by uid 99); 20 Jul 2014 02:45:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Jul 2014 02:45:49 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jin.oyj@alibaba-inc.com designates 42.120.133.66 as permitted sender) Received: from [42.120.133.66] (HELO out4133-66.mail.aliyun.com) (42.120.133.66) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Jul 2014 02:45:46 +0000 DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=alibaba-inc.com; s=default; t=1405824307; h=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type; bh=JmlU99k2MrWqlR7/SXc3sHWN+qF4OTUKxCN4HPYWgXQ=; b=xwGfY/O0y9UQKd8MRKaiPzc2dhAnHgmd8ECXXzpEGDkCfPsvuvZiE52CzD64tuksbStllT4Q0LAdze/TySNGhUeFQnqkhKfifdsTmJ1P3MV3IBh5HGlwTrISfoLs98ZfgbDKI1vu56IMWt+gG+LiFPPXPPHbtX0F6NMqbAFgnJM= Received: from WS-web (jin.oyj@alibaba-inc.com[42.120.74.148]) by r46e03201.xy2.aliyun.com at Sun, 20 Jul 2014 10:45:05 +0800 Date: Sun, 20 Jul 2014 10:45:05 +0800 From: "=?UTF-8?B?5qyn6Ziz5pmLKOasp+mYs+aZiyk=?=" To: "yarn-dev@hadoop.apache.org" , "Devaraj K" Reply-To: "=?UTF-8?B?5qyn6Ziz5pmLKOasp+mYs+aZiyk=?=" Message-ID: <2bc6c458-8998-4a3b-bd7f-182d1e221149@alibaba-inc.com> Subject: =?UTF-8?B?UmXvvJpBYm91dCBSZXNvdXJjZVJlcXVlc3QgZm9yIGEgc2VsZi13cml0dGVuIEFwcE1hc3Rl?= =?UTF-8?B?ciB0byBSZXNvdXJjZU1hbmFnZXI=?= X-Mailer: Alimail-Mailagent revision 2637471 MIME-Version: 1.0 References: <217284b8-8789-45e2-b54b-d517ef486a1e@alibaba-inc.com>,CAJzFTdZEEkMn3izXNqo72u4yrkh9nFK0KaKq8hmfY5oTBV9QDw@mail.gmail.com In-Reply-To: CAJzFTdZEEkMn3izXNqo72u4yrkh9nFK0KaKq8hmfY5oTBV9QDw@mail.gmail.com Content-Type: multipart/alternative; boundary="----=ALIBOUNDARY_14376_557e0940_53cb2d31_27a4d" X-Virus-Checked: Checked by ClamAV on apache.org ------=ALIBOUNDARY_14376_557e0940_53cb2d31_27a4d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you very much Devaraj. It solves my question. And I wonder if this is th= e same thing the MapReduce ApplicationMaster do when it request resource to RM= ? Because MR is the App that can run map immediately after some containers for= map are allocated, so for Map phase, MR AppMaster just send a total resource = request for the first time and then just wait for allocation response?=0AThank= s!Ouyang Jin------------------------------------------------------------------= =0A=E5=8F=91=E4=BB=B6=E4=BA=BA=EF=BC=9ADevaraj K =0A=E5=8F= =91=E9=80=81=E6=97=B6=E9=97=B4=EF=BC=9A2014=E5=B9=B47=E6=9C=8820=E6=97=A5(=E6=98= =9F=E6=9C=9F=E6=97=A5) 01:51=0A=E6=94=B6=E4=BB=B6=E4=BA=BA=EF=BC=9Ayarn-dev@ha= doop.apache.org ; =E6=AC=A7=E9=98=B3=E6=99=8B(=E9=A3= =8E=E9=AA=96) =0A=E4=B8=BB=E3=80=80=E9=A2=98=EF=BC=9A= Re: About ResourceRequest for a self-written AppMaster to ResourceManager=0A=0A= Hi Jin,=0A=C2=A0 =C2=A0 =C2=A0You don't need to request containers for each al= locate=0Ainvocation. You can send containers request one time for 10 container= s and then=0Akeep on checking the allocate response for containers allocation,= RM will try to allocate=0Aand gives as part of allocate response whenever the= y become available. =0A=0A=0AFor ex: If we request for 10 containers, assume R= M can=0Aallocate 2 containers at that time then RM gives two containers and ke= eps the=0Aremaining 8 containers request information. In future RM continues t= o allocate remaining=0Arequests whenever resources available and gives to Appl= icationMaster as part of=0Aallocate response.=0A=0AOn Sat, Jul 19, 2014 at 10:= 01 PM, =E6=AC=A7=E9=98=B3=E6=99=8B(=E6=AC=A7=E9=98=B3=E6=99=8B) wrote:=0A=0AHi all:I'm writing my own AppMaster to run in YARN. An= d I'm confused about resource request between AppMaster and ResourceManager.My= situation is that I want total 10 containers, so in my AppMaster . after some= initiallization , my AppMaster send a 10 container resource request to Resour= ceManager, call allocate interface, and wait for allocation in a while loop. M= y app is such a type that it can run container immediately after allocation ha= ppens . So after maybe 2 containers are allocated by ResourceManager, I tell N= odeManager to launch it . So my question is, should I send a new ResourceReqeu= st to ResourceManager that I need 8 Container ? =C2=A0It seems that after the = first time I send a resource request and waiting for allocation , I can get co= ntainers , but I don't know whether that's suitable.Thanks!OuYang Jin=0A=0A=0A= -- =0A=0A=0AThanksDevaraj K=0A ------=ALIBOUNDARY_14376_557e0940_53cb2d31_27a4d--