0
在hadoop中写分布式缓存的各种方式是什么? 选项:在hadoop中写分布式缓存的各种方式
DistributedCache.addCacheFile(new URI("/cachefile1"),job.getConfiguration());
Path[] localFiles = DistributedCache.getLocalCacheFiles(conf);
什么其他办法?
在hadoop中写分布式缓存的各种方式是什么? 选项:在hadoop中写分布式缓存的各种方式
DistributedCache.addCacheFile(new URI("/cachefile1"),job.getConfiguration());
Path[] localFiles = DistributedCache.getLocalCacheFiles(conf);
什么其他办法?
当您提交作业时,通过-files选项指定文件。
这些不是2个选项。这是一种选择。这两个命令一起工作。另一种从mapper/reducer获取文件的方式发布在这里:http://stackoverflow.com/questions/17291344/hadoop-large-files-in-distributed-cache – vefthym