hadoop 1.2.1版本 中 调用distributedCache时候不能用别名

论坛 期权论坛 脚本     
匿名网站用户   2020-12-20 10:36   24   0

hadoop 1.2.1版本 中 调用distributedCache时候不能用别名

https://www.imooc.com/video/15788
提示:java.io.FileNotFoundException: matrix2

代码如下:

DistributedCache.addCacheFile(new URI(uriWithLink), conf);

在eclipse下运行,提示:

WARN mapred.LocalJobRunner: LocalJobRunner does not support symlinking into current working dir.
意思是当前不支持别名。
又查了相关symlink,http://www.dataguru.cn/thread-301807-1-1.html,mapred.create.symlink 需要更改升级hadoop,故作罢,直接引用 。

Path[] caches = DistributedCache.getLocalCacheFiles(context        .getConfiguration());
FileReader reader2 = new FileReader(caches[0].toString());

就可以找到文件了

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:1136255
帖子:227251
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP