我的理解是
分布式模式下的 DistributedCache.getCacheFiles() 和伪分布式模式下的DistributedCache.getLocalCacheFiles()。
那么我们能否在 MapReduce 代码中检查我们是在伪模式还是分布式模式下运行
if(distributed)
DistributedCache.getCacheFiles()
else
DistributedCache.getLocalCacheFiles()
我们可以做这样的事情还是有更好的方法。
即使我们在相对模式下使用DistributedCache.getCacheFiles()和DistributedCache.getLocalCacheFiles() , DistributedCache 也可以获取HDFS 或本地数据。