Return-Path: Delivered-To: apmail-hadoop-core-user-archive@www.apache.org Received: (qmail 49709 invoked from network); 26 Jun 2009 03:35:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jun 2009 03:35:10 -0000 Received: (qmail 99245 invoked by uid 500); 26 Jun 2009 03:35:18 -0000 Delivered-To: apmail-hadoop-core-user-archive@hadoop.apache.org Received: (qmail 99045 invoked by uid 500); 26 Jun 2009 03:35:18 -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 99035 invoked by uid 99); 26 Jun 2009 03:35:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2009 03:35:18 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=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, 26 Jun 2009 03:35:06 +0000 Received: from ownstrong-lr.eglbp.corp.yahoo.com (ownstrong-lr.eglbp.corp.yahoo.com [10.66.74.39]) by mrout2-b.corp.re1.yahoo.com (8.13.8/8.13.8/y.out) with ESMTP id n5Q3X4Zl038556 for ; Thu, 25 Jun 2009 20:33:05 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:subject: references:in-reply-to:content-type:content-transfer-encoding; b=Wr3K8Lnx4B2ufgb5LzDZxe7WbosTiJraMIwflDEK0t9WlNoxzR+NdfAh+4E8OTj4 Message-ID: <4A4441C5.3020804@yahoo-inc.com> Date: Fri, 26 Jun 2009 09:04:29 +0530 From: Amareshwari Sriramadasu User-Agent: Thunderbird 2.0.0.22 (X11/20090605) MIME-Version: 1.0 To: core-user@hadoop.apache.org Subject: Re: Using addCacheArchive References: <24207739.post@talk.nabble.com> <24210836.post@talk.nabble.com> In-Reply-To: <24210836.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Akhil, DistributedCache.addCacheArchive takes path on hdfs. From your code, it looks like you are passing local path. Also, if you want to create symlink, you should pass URI as hdfs://#, besides calling DistributedCache.createSymlink(conf); Thanks Amareshwari akhil1988 wrote: > Please ask any questions if I am not clear above about the problem I am > facing. > > Thanks, > Akhil > > akhil1988 wrote: > >> Hi All! >> >> I want a directory to be present in the local working directory of the >> task for which I am using the following statements: >> >> DistributedCache.addCacheArchive(new URI("/home/akhil1988/Config.zip"), >> conf); >> DistributedCache.createSymlink(conf); >> >> >>>> Here Config is a directory which I have zipped and put at the given >>>> location in HDFS >>>> >> I have zipped the directory because the API doc of DistributedCache >> (http://hadoop.apache.org/core/docs/r0.20.0/api/index.html) says that the >> archive files are unzipped in the local cache directory : >> >> DistributedCache can be used to distribute simple, read-only data/text >> files and/or more complex types such as archives, jars etc. Archives (zip, >> tar and tgz/tar.gz files) are un-archived at the slave nodes. >> >> So, from my understanding of the API docs I expect that the Config.zip >> file will be unzipped to Config directory and since I have SymLinked them >> I can access the directory in the following manner from my map function: >> >> FileInputStream fin = new FileInputStream("Config/file1.config"); >> >> But I get the FileNotFoundException on the execution of this statement. >> Please let me know where I am going wrong. >> >> Thanks, >> Akhil >> >> > >