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 4473FD534 for ; Sun, 23 Sep 2012 07:55:20 +0000 (UTC) Received: (qmail 59993 invoked by uid 500); 23 Sep 2012 07:55:16 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 59360 invoked by uid 500); 23 Sep 2012 07:55:10 -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 59320 invoked by uid 99); 23 Sep 2012 07:55:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2012 07:55:08 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FSL_RCVD_USER,HTML_FONT_FACE_BAD,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of meru.varad@gmail.com designates 209.85.216.41 as permitted sender) Received: from [209.85.216.41] (HELO mail-qa0-f41.google.com) (209.85.216.41) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2012 07:55:01 +0000 Received: by qatp27 with SMTP id p27so556972qat.14 for ; Sun, 23 Sep 2012 00:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=/KvvqSYs3KQGuynGWO3X8B20bm7LdOToxMgutv0aEuE=; b=RQFhJQfXWOmVogzpx4ujwyVUBJsINucDD5ti4B1cbLI8NvDZ3GIfRvHzsWVMRJbhoJ uiYRtYAgTrUR/vq3bH+TAH13Pyrpsw95lAZaOKobi7im8MM3Pxfb1gczs1HMzn0gfLov LEcYNw8HJG6awDFCPim0ruH2SGKn+QuTiKVZJBOx4NeSLOCG+6df/qrQMh4Pahb7SW/A inlxGKr6ooWTnevGrM97JEA0YbuDlNM0FbRvZuC9H7lpFe58p6O50qtbs2B1cNRCjHjr KaaLVydj56Bn471aiA2ZbiE49uv9Vf0puW/R4IamyWtWQipkoM/Ui0vCZ5lTZ1I6qRNl ui1w== MIME-Version: 1.0 Received: by 10.224.138.143 with SMTP id a15mr24342047qau.64.1348386880442; Sun, 23 Sep 2012 00:54:40 -0700 (PDT) Received: by 10.49.40.135 with HTTP; Sun, 23 Sep 2012 00:54:40 -0700 (PDT) Date: Sun, 23 Sep 2012 13:24:40 +0530 Message-ID: Subject: Passing Command-line Parameters to the Job Submit Command From: Varad Meru To: common-user@hadoop.apache.org Cc: Varad Meru Content-Type: multipart/alternative; boundary=20cf3074d77c07528004ca59c920 --20cf3074d77c07528004ca59c920 Content-Type: text/plain; charset=ISO-8859-1 Hi, I want to run the PiEstimator example from using the following command $hadoop job -submit pieestimatorconf.xml which contains all the info required by hadoop to run the job. E.g. the input file location, the output file location and other details. mapred.jarfile:////Users/varadmeru/Work/Hadoop/hadoop-examples-1.0.3.jar mapred.map.tasks20 mapred.reduce.tasks2 ... mapred.job.namePiEstimator mapred.output.dirfile:////Users/varadmeru/Work/out Now, as we now, to run the PiEstimator, we can use the following command too $hadoop jar hadoop-examples.1.0.3 pi 5 10 where 5 and 10 are the arguments to the main class of the PiEstimator. How can I pass the same arguments (5 and 10) using the job -submit command through conf. file or any other way, without changing the code of the examples to reflect the use of environment variables. Thanks in advance, Varad ----------------- Varad Meru Software Engineer, Business Intelligence and Analytics, Persistent Systems and Solutions Ltd., Pune, India. --20cf3074d77c07528004ca59c920--