Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1173C104D9 for ; Tue, 11 Jun 2013 20:25:31 +0000 (UTC) Received: (qmail 51299 invoked by uid 500); 11 Jun 2013 20:25:26 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 51198 invoked by uid 500); 11 Jun 2013 20:25:26 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 51191 invoked by uid 99); 11 Jun 2013 20:25:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jun 2013 20:25:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hitesh@hortonworks.com designates 209.85.220.45 as permitted sender) Received: from [209.85.220.45] (HELO mail-pa0-f45.google.com) (209.85.220.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jun 2013 20:25:17 +0000 Received: by mail-pa0-f45.google.com with SMTP id bi5so5879628pad.4 for ; Tue, 11 Jun 2013 13:24:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=VW7YXajS97wfRUZxGXxO5a2q+WeXUQe67laUoVyN+Fg=; b=hc2BR6Tb7VOR/hl9JNMew1YZM/1tx1u76ppsKPOykmKLXPv04SRVSM64uP+FAHIRrN etwCtRoV1T3Jc/pfCQZOunyPMwRdjGQRj9tdM04sAkLJJ17vKgUBGld7QYEJL756jp0T K+UlCziuNfLKF7QB1WzWBsvfYI/zVW25w0ZHQv2vJoh2YhaoJkJCAzuf9eD2igT2XeJF C39rytyPfynmru7axE6VaZLMZVGQCYU5TOmrs/p2R/Lcm5RaZmCZwjdPbjH/Ieiy/JIN X/LpubbB5r8zohX4NH1jLNOufmdtRGebsZdZHm0pQ7qAXwTL2v2wjegvlxgnlxeHbLb3 Qldg== X-Received: by 10.68.134.131 with SMTP id pk3mr16772599pbb.83.1370982296580; Tue, 11 Jun 2013 13:24:56 -0700 (PDT) Received: from [10.11.3.133] ([192.175.27.2]) by mx.google.com with ESMTPSA id bs2sm21438300pad.17.2013.06.11.13.24.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Jun 2013 13:24:55 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1085) Subject: Re: YARN Container's App ID From: Hitesh Shah In-Reply-To: <51B77708.6000509@etinternational.com> Date: Tue, 11 Jun 2013 13:24:53 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <421F30ED-E923-4267-96DF-B63580846BBD@hortonworks.com> References: <51B770A5.4030509@etinternational.com> <022AB133-BCAA-46A7-846B-0BD812F02B80@hortonworks.com> <51B77708.6000509@etinternational.com> To: user@hadoop.apache.org X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQnxN4UVW3su9DRKK1aTtNG26h6xaau7Z1QDDPJ5EjjeegzDNrdt25CUfG/MD2bnxM7PFaBp X-Virus-Checked: Checked by ClamAV on apache.org Yes - this is currently on trunk. There were some changes done to make = the container id available to all containers ( and not only the AM ). However, for 2.0.3-alpha, I believe you should have access to = ApplicationConstants.AM_CONTAINER_ID_ENV in the AM's environment.=20 -- Hitesh On Jun 11, 2013, at 12:14 PM, Brian C. Huffman wrote: > Hitesh, >=20 > Is this only in trunk? I'm currently running 2.0.3-alpha and I don't = see it there. I also don't see it in the latest 2.0.5. >=20 > Thanks, > Brian >=20 > On 06/11/2013 02:54 PM, Hitesh Shah wrote: >> Hello Brian, >>=20 >> org.apache.hadoop.yarn.api.ApplicationConstants.Environment should = have a list of all the information set in the environment. >>=20 >> One of these is the container ID. ApplicationAttemptID can be = obtained from a container ID object which in turn can be used to get the = App Id. >>=20 >> -- Hitesh >>=20 >> On Jun 11, 2013, at 11:47 AM, Brian C. Huffman wrote: >>=20 >>> How can a YARN container get its own Application ID? >>>=20 >>> I tried getting the ApplicationConstants.AM_APP_ATTEMPT_ID_ENV = similar to how the Distributed Shell example does for the AppMaster, but = that variable doesn't seem to exist in the environment for the = container. Does the App Master have to set it? >>>=20 >>> Thanks, >>> Brian >>>=20 >=20 >=20