Return-Path: Delivered-To: apmail-hadoop-core-user-archive@www.apache.org Received: (qmail 61659 invoked from network); 17 Apr 2009 06:52:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Apr 2009 06:52:32 -0000 Received: (qmail 55220 invoked by uid 500); 17 Apr 2009 06:52:29 -0000 Delivered-To: apmail-hadoop-core-user-archive@hadoop.apache.org Received: (qmail 55114 invoked by uid 500); 17 Apr 2009 06:52:29 -0000 Mailing-List: contact core-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-user@hadoop.apache.org Delivered-To: mailing list core-user@hadoop.apache.org Received: (qmail 55104 invoked by uid 99); 17 Apr 2009 06:52:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Apr 2009 06:52:29 +0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [69.147.107.21] (HELO mrout2-b.corp.re1.yahoo.com) (69.147.107.21) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Apr 2009 06:52:18 +0000 Received: from SNV-EXBH01.ds.corp.yahoo.com (snv-exbh01.ds.corp.yahoo.com [207.126.227.249]) by mrout2-b.corp.re1.yahoo.com (8.13.8/8.13.8/y.out) with ESMTP id n3H6p94O082363 for ; Thu, 16 Apr 2009 23:51:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=received:x-mimeole:content-class:mime-version: content-type:subject:date:message-id:x-ms-has-attach: x-ms-tnef-correlator:thread-topic:thread-index:from:to:x-originalarrivaltime; b=h2754esXGr+fFeynYoct9P53ZVrE9Td88OwStawL4CjrVnKxDYlGWpj6B0XYn/Ef Received: from SNV-EXVS01.ds.corp.yahoo.com ([216.145.51.185]) by SNV-EXBH01.ds.corp.yahoo.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 16 Apr 2009 23:51:09 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C9BF28.BC0C8CA0" Subject: Re: Question about the classpath setting for bin/hadoop jar Date: Thu, 16 Apr 2009 23:50:03 -0700 Message-ID: <2C52DBBEC4855C438BB330CB0D3B46590131C8CA@SNV-EXVS01.ds.corp.yahoo.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Question about the classpath setting for bin/hadoop jar Thread-Index: Acm/KLv+pisjDorDSU67QAtaDKWCHw== From: "Sharad Agarwal" To: X-OriginalArrivalTime: 17 Apr 2009 06:51:09.0413 (UTC) FILETIME=[E38E7150:01C9BF28] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C9BF28.BC0C8CA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > I noticed that the "bin/hadoop jar" command doesn't add the jar being = executed to the classpath. Is this deliberate and what is the reasoning? = The result is that resources in the jar are not accessible from the = system class loader. Rather they are only available from the thread = context class loader and the class loader of the main class. In map and reduce tasks' jvm, job libraries are added to the system = classloader. However for others only framework code is present in system = classloader. If you are seeing this as a problem in your client side = code, you can use Configuration#getClassByName(String name) instead of = Class.forName() for loading your job related classes. ------_=_NextPart_001_01C9BF28.BC0C8CA0--