2014-02-24 57 views
0

在hadoop中写分布式缓存的各种方式是什么? 选项:在hadoop中写分布式缓存的各种方式

  1. DistributedCache.addCacheFile(new URI("/cachefile1"),job.getConfiguration());
  2. Path[] localFiles = DistributedCache.getLocalCacheFiles(conf);

什么其他办法?

+0

这些不是2个选项。这是一种选择。这两个命令一起工作。另一种从mapper/reducer获取文件的方式发布在这里:http://stackoverflow.com/questions/17291344/hadoop-large-files-in-distributed-cache – vefthym

回答

0

当您提交作业时,通过-files选项指定文件。