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 AC74DD020 for ; Tue, 12 Mar 2013 19:50:31 +0000 (UTC) Received: (qmail 47310 invoked by uid 500); 12 Mar 2013 19:50:26 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 47054 invoked by uid 500); 12 Mar 2013 19:50: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 47047 invoked by uid 99); 12 Mar 2013 19:50:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 19:50:26 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tombrown52@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-we0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 19:50:22 +0000 Received: by mail-we0-f180.google.com with SMTP id k14so233242wer.39 for ; Tue, 12 Mar 2013 12:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=uu/iHG29x5UhEtI00ATjkLYs435V0NqWEQn0LnsvUs4=; b=lOqMxy/+s7GsdnqjlYSA75pJjaVyFSpj49QC1NJDoZFbgeq5pG3OYFVEtwYz76wesm cBrlR3XqqIwGKPuW+An4Dqz0BpQKysjOMYlZVyjNGSzgEvaamQzPF9Vn6+zYpQnJ9N86 sj8eQSL/RNGZ9tb0BeEFwbamymXSZaz2fHwVqwOk2AMjiIj0Avhh2hHCgH/Z8FsHTPoJ UBDWjjx3x4xCuE/3ITLyGLz8wSmw7cYD63jgpEzNsEHLuE1Z8KnLqzMO0TPmkn4E+0Qc SqrPVLfxhIX+pQb5l5qaaRkzw9FGWI8gBD1csm4Ee9WQdeadu98qyM9N7go/KBh53ZOg n7AQ== MIME-Version: 1.0 X-Received: by 10.180.78.168 with SMTP id c8mr22263216wix.27.1363117801097; Tue, 12 Mar 2013 12:50:01 -0700 (PDT) Received: by 10.194.162.99 with HTTP; Tue, 12 Mar 2013 12:50:00 -0700 (PDT) Date: Tue, 12 Mar 2013 13:50:00 -0600 Message-ID: Subject: HADOOP_CLIENT_OPTS getting set multiple times (is this a bug?) From: Tom Brown To: user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org I am using Hadoop 1.0.2 (the stock .deb, compiled by HortonWorks AFAIK). I noticed that my task tracker processes have multiple "-Xmx" configs attached, and that the later ones (128m) were overriding the ones I had intended to be used (500m). After digging through the various scripts, I found that the problem is happening because "hadoop-env.sh" is getting invoked multiple times. The deb file created a link from "/etc/profile.d/" to hadoop-env.sh, so this file is run whenever I log in. The "hadoop" script also invokes hadoop-env.sh (via "hadoop-config.sh"). The following sequence is causing the problem: 1. The first time hadoop-env.sh is invoked (when the user logs in), HADOOP_CLIENT_OPTS is set to "-Xmx128m ...". 2. The second time hadoop-env.sh is invoked (when a Hadoop process is started), HADOOP_OPTS is set to "... $HADOOP_CLIENT_OPTS" (thereby including the memory setting for all Hadoop processes in general) 3. Also during the second execution, HADOOP_CLIENT_OPTS is recursively set to "-Xmx128m $HADOOP_CLIENT_OPTS" (so it now contains "-Xmx128m -Xmx128m"). 4. When the actual hadoop process is started, it always includes both JAVA_HEAP_SIZE and HADOOP_OPTS (in that order), but since HADOOP_OPTS also has a memory setting and is later in the command line, it takes precedence. I couldn't find any bug that matched this, so I thought I'd reach out to the community: Is this a known bug? Do the scripts and deb file belong to Hadoop in general, or is this the responsibility of a specific distribution? Thanks in advance! --Tom