Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 CE112D2FE for ; Sat, 11 Aug 2012 15:55:29 +0000 (UTC) Received: (qmail 64662 invoked by uid 500); 11 Aug 2012 15:55:25 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 64560 invoked by uid 500); 11 Aug 2012 15:55:24 -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 64552 invoked by uid 99); 11 Aug 2012 15:55:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Aug 2012 15:55:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of harsh@cloudera.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Aug 2012 15:55:18 +0000 Received: by obbtb18 with SMTP id tb18so4999466obb.35 for ; Sat, 11 Aug 2012 08:54:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding:x-gm-message-state; bh=QJ+pVtVQe99qFafCU4pZNaCDxCaXSCwqmGMM1sdol/k=; b=LKWXYFf/TVIipnEB2fznMD+CZHdYvI4cutivAW/noYMEQWlbNaGu4ASU46XYQxWXwx KiDqT8m6Ch5jN8krkOtJvi84ODhrvBr+ZbAdfL60Oo/pyPjetGFChnUe9ag7ZlnVTmcW Md7qdnYjfvut6rxSh5D7Pl6lGo97R4reVOYEJiiokrUbWndI6qHfMO0ICQbesRBaE57s F4OUpEfZqgcYPuskn3+/dUm371cSdh0xE6WKcXgWp/6BG//PDo7KLaCuxGvAnW/Nxy2F jX3tUS5H5LPCmsbjOFVUjKIdzuV4jPNgIr47o7Cx1gfVUAcd7VTgoh9pv10UBP1keHzl WtDg== Received: by 10.182.177.7 with SMTP id cm7mr2862136obc.17.1344700497864; Sat, 11 Aug 2012 08:54:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.11.168 with HTTP; Sat, 11 Aug 2012 08:54:37 -0700 (PDT) In-Reply-To: <5F42B825-A4E0-436D-9368-EDA05BDC5C76@gmail.com> References: <5F42B825-A4E0-436D-9368-EDA05BDC5C76@gmail.com> From: Harsh J Date: Sat, 11 Aug 2012 21:24:37 +0530 Message-ID: Subject: Re: Compiling a mapreduce job under the new Apache Hadoop YARN To: user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQm37gDt92v/tJAQCmPOs/kbRJWkImH+xfK+qBvZSo+AlHz6l+pxdPUoSXyaPlzdXWPHBURW X-Virus-Checked: Checked by ClamAV on apache.org Hi Pantazis, It is better to use maven or other such tools to develop MR Java programs, as that handles dependencies for you. In maven you may use the hadoop-client POM. Alternatively, if you have a hadoop setup available, do this: $ javac -cp `hadoop classpath`:. -d class_dir Example.java The command "hadoop classpath" will add all requisite jars from the installed version to the java(c) classpath automatically. On Sat, Aug 11, 2012 at 7:25 AM, Pantazis Deligiannis wrote: > In the old Hadoop mapreduce v1 framework (e.g. 1.0.3) the way to compile = a job was using the already provided "hadoop-core-HADOOP_VERSION.jar" throu= gh the following command: > > javac -cp ".../hadoop-core-HADOOP_VERSION.jar" -d class_dir Example.j= ava > > In the newest releases for Hadoop mapreduce v2 YARN (e.g. 2.0.1-alpha or = the cloudera 4.0) a similar core.jar is not provided, though, to be used du= ring compilation. The closest i have managed to get is by using the "hadoop= -common-2.0.1-alpha.jar" in the /share/hadoop/common dir but this still lea= ves a lot of compilation errors. > > Is there some other specific way or using different jars for compiling a = YARN job? Or maybe for some reason you need to build the source yourself in= the new releases to get the core.jar? I have searched quite a lot but can'= t find a relevant answer. > > Thank you very much! --=20 Harsh J