Accessing files in hadoop distributed cache

前端 未结 4 2040
夕颜
夕颜 2021-02-06 04:42

I want to use the distributed cache to allow my mappers to access data. In main, I\'m using the command

DistributedCache.addCacheFile(new URI(\"/user/peter/cac         


        
4条回答
  •  情话喂你
    2021-02-06 05:31

    Configuration conf = new Configuration();  
    Job job = new Job(conf, "wordcount");
    DistributedCache.addCacheFile(new URI("/userpetercacheFiletestCache1"),job.getConfiguration());
    

    You can also do it in this way.

提交回复
热议问题