我尝试将本地文件存储在分布式缓存上。该文件存在,但我得到一个 File not found 异常
代码片段:
DistributedCache.addCacheFile(new URI("file://"+fileName), conf);
RunningJob job = JobClient.runJob(conf);
例外:
Error initializing attempt_201310150245_0066_m_000021_0:
java.io.FileNotFoundException: File /Workflow/data does not exist
at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:468)
at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:380)
at org.apache.hadoop.filecache.TaskDistributedCacheManager.setupCache(TaskDistributedCacheManager.java:180)
at org.apache.hadoop.mapred.TaskTracker$4.run(TaskTracker.java:1454)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.TaskTracker.initializeJob(TaskTracker.java:1445)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:1360)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:2786)
有任何想法吗?