Return-Path: Delivered-To: apmail-hadoop-general-archive@minotaur.apache.org Received: (qmail 26838 invoked from network); 10 Oct 2009 18:39:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Oct 2009 18:39:21 -0000 Received: (qmail 11738 invoked by uid 500); 10 Oct 2009 18:39:20 -0000 Delivered-To: apmail-hadoop-general-archive@hadoop.apache.org Received: (qmail 11654 invoked by uid 500); 10 Oct 2009 18:39:20 -0000 Mailing-List: contact general-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@hadoop.apache.org Delivered-To: mailing list general@hadoop.apache.org Received: (qmail 11644 invoked by uid 99); 10 Oct 2009 18:39:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Oct 2009 18:39:20 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jason.hadoop@gmail.com designates 209.85.212.186 as permitted sender) Received: from [209.85.212.186] (HELO mail-vw0-f186.google.com) (209.85.212.186) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Oct 2009 18:39:09 +0000 Received: by vws16 with SMTP id 16so5548525vws.2 for ; Sat, 10 Oct 2009 11:38:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=u+Ygi/Rf11Rtk6v4XIWQuAWYQXsteOa1BKxjs3ydNqo=; b=t9KFPc+gTPR/JBDghvoFX0dv2FgvPWQ0cULVrdrB9ki2d5Me2IkzUwv118srH7bL3W dmXVPx7mwgaKnJ725xKRO2C/AgtQEb1JydtDjLGIsTFzoIvzJAaVl8VgUMigrt4tcDQ1 U0S0sxDcRviqviccMbgwNqVakCXOwaDVQoVMQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=MPau9kcokw/tM+Gmi/LQCppnDXGmYQZ2IVu1X4ZzEnu55dcxM7aOcrrGaVWL9D1iaA oRxuef9qe4sE6KXHgWWtBFMsz6hl90KdrYz8AtG1AJvi6himNWmGWU9hjP0cYuTwQI5W FRpxXdJAJWlJZPNkLU6HpW5RhqfMjSml2pviY= MIME-Version: 1.0 Received: by 10.220.88.209 with SMTP id b17mr5993402vcm.98.1255199928470; Sat, 10 Oct 2009 11:38:48 -0700 (PDT) In-Reply-To: <309f76d00910101048x4028765fg477f1b249e223c8b@mail.gmail.com> References: <309f76d00910101048x4028765fg477f1b249e223c8b@mail.gmail.com> Date: Sat, 10 Oct 2009 11:38:48 -0700 Message-ID: <314098690910101138x4586a05bj9ba03ad483040e1@mail.gmail.com> Subject: Re: SIMPLE QUESTIONS ABOUT DISTRIBUTEDCACHE... From: Jason Venner To: general@hadoop.apache.org Content-Type: multipart/alternative; boundary=001636284e58dbcc92047599011d X-Virus-Checked: Checked by ClamAV on apache.org --001636284e58dbcc92047599011d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The distributed cache does not behave as expected in PsuedoDistributed mode= . Since all of the tasks run within the same jvm, there is no easy way to alter the class path to add distributed cache items, in addition there is n= o way to change the working directory of the jvm to the 'per task directory' that the normal task runner creates, where the distributed cache items made available. On Sat, Oct 10, 2009 at 10:48 AM, Alberto Luengo Cabanillas < cabiwan@gmail.com> wrote: > Hi everyone! I=B4m trying to distribute some common data between my nodes= , > but > I=B4m unable to do it. I have some questions about this: > > 1.- I=B4m working in PseudoDistributed mode in Windows (under Cygwin) and= my > DFS server is running on a virtual machine (Ubuntu server). May I use > DistributedCache normally with this configuration? > 2.-In the case of the Mapper nodes, in the Driver class I add these two > lines: > > URI uriMapper =3Dnew URI("/user/hadoop-user/data/mapper_configuration.dat= "); > (I also verify this file already exists in the DFS). > DistributedCache.addCacheFile(uriMapper,conf); > > 3.- In the Mapper class, I have this: > > @Override > protected void setup(Context cont) { > ... > String configureCacheName =3D new > Path("/user/hadoop-user/data/mapper_configuration.dat").getName(); > Path [] cacheFiles =3D > DistributedCache.getLocalCacheFiles(cont.getConfiguration()); > System.out.println("The file is: "+cacheFiles.toString()); > ... > } > > Does anyone have an idea about what I=B4m doing wrong? (I=B4m going crazy= , > actually...) > > Thanks a lot in advance. > > -- > Alberto > --=20 Pro Hadoop, a book to guide you from beginner to hadoop mastery, http://www.amazon.com/dp/1430219424?tag=3Djewlerymall www.prohadoopbook.com a community for Hadoop Professionals --001636284e58dbcc92047599011d--