I think the API call you're looking for is DistributedCache.addCacheFile(URI, Configuration) [1]
-Joey [1] http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/filecache/DistributedCache.html#addCacheFile(java.net.URI, org.apache.hadoop.conf.Configuration) 2011/9/23 谭军 <tanjun_2...@163.com>: > Hi Joey Echeverria, > My hadoop version is 0.20.2 > > -- > > Regards! > > Jun Tan > > 在 2011-09-24 11:36:08,"Joey Echeverria" <j...@cloudera.com> 写道: >>Which version of Hadoop are you using? >> >>2011/9/23 谭军 <tanjun_2...@163.com>: >>> Harsh, >>> It is java.net.URI that is imported. >>> >>> -- >>> >>> Regards! >>> >>> Jun Tan >>> >>> At 2011-09-24 00:52:14,"Harsh J" <ha...@cloudera.com> wrote: >>>>Jun, >>>> >>>>Common cause is that your URI class is not the right import. >>>> >>>>It must be java.net.URI and not any other class. Fix this and your >>>>problem would go away. >>>> >>>>2011/9/23 谭军 <tanjun_2...@163.com>: >>>>> Hi, >>>>> I encountered an error that I cannot understand. >>>>> >>>>> Configuration conf = new Configuration(); >>>>> Job job = new Job(conf, "job1"); >>>>> job.addCacheFile(new URI(args[0])); >>>>> >>>>> Why did it report "The method addCacheFile(URI) is undefined for the type >>>>> Job"? >>>>> Thanks! >>>>> -- >>>>> >>>>> Regards! >>>>> >>>>> Jun Tan >>>>> >>>>> >>>> >>>> >>>> >>>>-- >>>>Harsh J >>> >>> >>> >> >> >> >>-- >>Joseph Echeverria >>Cloudera, Inc. >>443.305.9434 > > > -- Joseph Echeverria Cloudera, Inc. 443.305.9434