Мне нужна помощь в отношении чтения файлов карт.
Я добавляю файлы в кеш с помощью -files options
yarn jar HadoopProjects.jar rsProject.driver -files hdfs://localhost:8020/data/mapFileTestFolder.tar.gz.. ..
здесь я называю это
@SuppressWarnings("deprecation")
@Override
protected void setup(Context context) {
try {
Path[] cacheLocalFiles = DistributedCache.getLocalCacheFiles(context.getConfiguration());
logF.info("reducer started setup");
for (Path path:cacheLocalFiles) {
logF("reducer setup " + path.getName().toString());
if (path.getName().toString().contains("mapFileTestFolder.tar.gz")) {
URI mapUri = new File(path.toString() + "/mapFileTestFolder").toURI();
logF.info("depReader init begins URI = " + mapUri.toString());
depReader = new MapFile.Reader(FileSystem.get(context.getConfiguration()),mapUri.toString(), context.getConfiguration());
logF.info("depReader init ends");
}
}
} catch (IOException e) {
e.printStackTrace();
logF.info("depReader init error - " + e);
}
//some other lines
}
Вот что я вижу в логах
2014-03-11 08:31:09,305 INFO [main] rsProject.myReducer: Инициализация depReader начинается URI = file:/home/hadoop/Training/hadoop_work /mapred/nodemanager/usercache/hadoop/appcache/application_1394318775013_0079/container_1394318775013_0079_01_000005/mapFileTestFolder.tar.gz/mapFileTestFolder
2014-03-11 08:35:09 INFOProject.mainrs MeDucer: inite init init - java.io.fileNotfoundexception:
mapFileTestFolder.tar.gz - это сжатый файл карты (с индексом и данными в нем)
Думаю, этот файл существует в распределенный кеш по мере того, как бегун переходит в состояние, если совпадает.
Почему это происходит? =/
Приветствуется любая помощь
Спасибо