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 D610A101B7 for ; Tue, 9 Jul 2013 22:03:20 +0000 (UTC) Received: (qmail 22244 invoked by uid 500); 9 Jul 2013 22:03:16 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 22007 invoked by uid 500); 9 Jul 2013 22:03:16 -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 22000 invoked by uid 99); 9 Jul 2013 22:03:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 22:03:15 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Andrew.Botelho@emc.com designates 168.159.213.141 as permitted sender) Received: from [168.159.213.141] (HELO mexforward.lss.emc.com) (168.159.213.141) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 22:03:08 +0000 Received: from hop04-l1d11-si02.isus.emc.com (HOP04-L1D11-SI02.isus.emc.com [10.254.111.55]) by mexforward.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id r69M2klO022559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 9 Jul 2013 18:02:46 -0400 Received: from mailhub.lss.emc.com (mailhubhoprd05.lss.emc.com [10.254.222.129]) by hop04-l1d11-si02.isus.emc.com (RSA Interceptor) for ; Tue, 9 Jul 2013 18:02:43 -0400 Received: from mxhub27.corp.emc.com (mxhub27.corp.emc.com [10.254.110.183]) by mailhub.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id r69M2hG1028419 for ; Tue, 9 Jul 2013 18:02:43 -0400 Received: from mx16a.corp.emc.com ([169.254.1.54]) by mxhub27.corp.emc.com ([10.254.110.183]) with mapi; Tue, 9 Jul 2013 18:02:42 -0400 From: "Botelho, Andrew" To: "user@hadoop.apache.org" Date: Tue, 9 Jul 2013 18:02:41 -0400 Subject: Distributed Cache Thread-Topic: Distributed Cache Thread-Index: Ac587ulHJpNs6+d2TQedQtdn17r0Yg== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_FAE0BE254247CA479284C8316D2FEB0C0D4009654EMX16Acorpemcc_" MIME-Version: 1.0 X-EMM-MHVC: 1 X-Virus-Checked: Checked by ClamAV on apache.org --_000_FAE0BE254247CA479284C8316D2FEB0C0D4009654EMX16Acorpemcc_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I was wondering if I can still use the DistributedCache class in the latest= release of Hadoop (Version 2.0.5). In my driver class, I use this code to try and add a file to the distribute= d cache: import java.net.URI; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.filecache.DistributedCache; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; Configuration conf =3D new Configuration(); DistributedCache.addCacheFile(new URI("file path in HDFS"), conf); Job job =3D Job.getInstance(); ... However, I keep getting warnings that the method addCacheFile() is deprecat= ed. Is there a more current way to add files to the distributed cache? Thanks in advance, Andrew --_000_FAE0BE254247CA479284C8316D2FEB0C0D4009654EMX16Acorpemcc_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I was wond= ering if I can still use the DistributedCache class in the latest release o= f Hadoop (Version 2.0.5).

In my driver c= lass, I use this code to try and add a file to the distributed cache:<= /o:p>

 

imp= ort java.net.URI;

import org.apache.hado= op.conf.Configuration;

import org.apache= .hadoop.filecache.DistributedCache;

impo= rt org.apache.hadoop.fs.*;

import org.ap= ache.hadoop.io.*;

import org.apache.hado= op.mapreduce.*;

import org.apache.hadoop= .mapreduce.lib.input.FileInputFormat;

im= port org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

 

Configurati= on conf =3D new Configuration();

Distrib= utedCache.addCacheFile(new URI("file path in HDFS"), conf);<= /o:p>

Job job =3D Job.getInstance();

 = ;

However, I keep getting warnings that the m= ethod addCacheFile() is deprecated.

Is t= here a more current way to add files to the distributed cache?

 

Thanks in = advance,

 

Andrew

= --_000_FAE0BE254247CA479284C8316D2FEB0C0D4009654EMX16Acorpemcc_--