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 6E0FDD8B6 for ; Thu, 11 Oct 2012 14:27:27 +0000 (UTC) Received: (qmail 804 invoked by uid 500); 11 Oct 2012 14:27:23 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 710 invoked by uid 500); 11 Oct 2012 14:27:23 -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 701 invoked by uid 99); 11 Oct 2012 14:27:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2012 14:27:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=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; Thu, 11 Oct 2012 14:27:17 +0000 Received: by mail-ob0-f176.google.com with SMTP id x4so2103304obh.35 for ; Thu, 11 Oct 2012 07:26:56 -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:x-gm-message-state; bh=I9DSTIq+kUmMxnm80DqMOJmo1OiUfGlJaRR4ii8XA4w=; b=RApBDrddIHdTOEu9sbxmYzdy9rrB6QsGRwer21VqrOlXfJ5jEZQmKudynseSYpkkBq /lBJ7zuKxrD7xN9G4r1cxZE0Lhgpr3JaZR7xwvLhX4zI8VrgnX39pElB2wLpQS6e2l5B p4hl+l2XepXlozIXrb0MxIDJ4Ytr2RVAVOXvsgVYHxQqzW1wgm5oW4RvyGnrFKV9pkeB J4Mr/hSyTQaiXufoh4woRpuSs9+p3ZHIZSHqGoKA1ZMnQeF/B+6of3mbj0TXPQ7JFY7b Htb1q5N77q9DpbseYUfoTnQwtkX/wfmpDRUqPwnBYR96YxZ25lSojwtJKOXSgpICaZyH eSwA== Received: by 10.182.54.103 with SMTP id i7mr818879obp.62.1349965616731; Thu, 11 Oct 2012 07:26:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.162.163 with HTTP; Thu, 11 Oct 2012 07:26:36 -0700 (PDT) In-Reply-To: References: From: Harsh J Date: Thu, 11 Oct 2012 19:56:36 +0530 Message-ID: Subject: Re: Referencing files in job file from code To: common-user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkf8XZDYrjfWs9zFI81ZOQ9MkWRUd+BSODzOZBq1N9BnsC9uZrMk2sNxu6vjudfjnvw8W0K X-Virus-Checked: Checked by ClamAV on apache.org Hi Bai, What exactly do you mean by a 'job file' and have you considered using DistributedCache, as detailed at http://hadoop.apache.org/docs/stable/mapred_tutorial.html#DistributedCache? On Thu, Oct 11, 2012 at 7:44 PM, Bai Shen wrote: > I'm trying to reference a directory inside my job file from my code. I > have a third party library that I need to pass a File object to which > references the directory in the job file. > > How do I go about doing this? If I just do new File("dir") it looks for > the directory on the client machine that I'm calling the job from instead > of the directory in the actual job file itself. > > Thanks. -- Harsh J