Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 643E1DD64 for ; Wed, 1 Aug 2012 20:34:22 +0000 (UTC) Received: (qmail 26550 invoked by uid 500); 1 Aug 2012 20:34:18 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 26501 invoked by uid 500); 1 Aug 2012 20:34:18 -0000 Mailing-List: contact common-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-user@hadoop.apache.org Delivered-To: mailing list common-user@hadoop.apache.org Received: (qmail 26492 invoked by uid 99); 1 Aug 2012 20:34:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2012 20:34:18 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwiley@keithwiley.com designates 69.56.216.30 as permitted sender) Received: from [69.56.216.30] (HELO gateway07.websitewelcome.com) (69.56.216.30) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2012 20:34:11 +0000 Received: by gateway07.websitewelcome.com (Postfix, from userid 5007) id C93EFDC4DF85E; Wed, 1 Aug 2012 15:33:50 -0500 (CDT) Received: from gator542.hostgator.com (gator542.hostgator.com [74.54.187.114]) by gateway07.websitewelcome.com (Postfix) with ESMTP id 873CFDC4DF6F5 for ; Wed, 1 Aug 2012 15:33:50 -0500 (CDT) Received: from [24.19.6.8] (port=47319 helo=[192.168.10.2]) by gator542.hostgator.com with esmtpa (Exim 4.77) (envelope-from ) id 1Swfc5-0003qj-3b for common-user@hadoop.apache.org; Wed, 01 Aug 2012 15:33:49 -0500 From: Keith Wiley Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Exec hadoop from Java, reuse JVM (client-side)? Date: Wed, 1 Aug 2012 13:33:47 -0700 Message-Id: <3587332D-18B0-4E4D-8C62-010B7A276D4B@keithwiley.com> To: common-user@hadoop.apache.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator542.hostgator.com X-AntiAbuse: Original Domain - hadoop.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - keithwiley.com X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.10.2]) [24.19.6.8]:47319 X-Source-Auth: kwiley+keithwiley.com X-Email-Count: 1 X-Source-Cap: a2J3aWxleTtrYndpbGV5O2dhdG9yNTQyLmhvc3RnYXRvci5jb20= X-Virus-Checked: Checked by ClamAV on apache.org I know there is a lot of discussion about JVM reuse in Hadoop, but that = usually refers to mappers running on the cluste nodesr. I have a much = different question. I am running a Java program which at one point = execs hadoop and that call sometimes fails in the fashion shown below. = Thus, this issue occurs entirely within the client machine (of course, I = am currently running in pseudo-distributed mode which convolutes that = point somewhat). In other words, I successfully ran a Java program, but = it failed to subsequently run *another* Java program (hadoop). My = interpretation of the hadoop startup scripts (the hadoop command itself = for example) is that they run a second JVM in my scenario, and that they = fail to allocate enough memory. Is there any way to run hadoop from within a JVM such that it reuses the = local JVM? EXCEPTION: java.io.IOException: Cannot run program "hadoop": = java.io.IOException: error=3D12, Cannot allocate memory java.lang.ProcessBuilder.start(ProcessBuilder.java:460) java.lang.Runtime.exec(Runtime.java:593) java.lang.Runtime.exec(Runtime.java:466) com.util.Shell.run(Shell.java:44) com.exe.Foo.bar(Foo.java:107) com.exe.Foo.run(Foo.java:205) com.exe.Foo.main(Foo.java:227) Exception in thread "main" java.io.IOException: Cannot run program = "hadoop": java.io.IOException: error=3D12, Cannot allocate memory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at java.lang.Runtime.exec(Runtime.java:593) at java.lang.Runtime.exec(Runtime.java:466) at com.util.Shell.run(Shell.java:44) at com.exe.Foo.bar(Foo.java:107) at com.exe.Foo.run(Foo.java:205) at com.exe.Foo.main(Foo.java:227) Caused by: java.io.IOException: java.io.IOException: error=3D12, Cannot = allocate memory at java.lang.UNIXProcess.(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) ... 6 more = __________________________________________________________________________= ______ Keith Wiley kwiley@keithwiley.com keithwiley.com = music.keithwiley.com "You can scratch an itch, but you can't itch a scratch. Furthermore, an = itch can itch but a scratch can't scratch. Finally, a scratch can itch, but an = itch can't scratch. All together this implies: He scratched the itch from the = scratch that itched but would never itch the scratch from the itch that scratched." -- Keith Wiley = __________________________________________________________________________= ______