0 votes
in Big Data | Hadoop by
DistributedCache feature of MapReducer

1 Answer

0 votes
by

DistributedCache distributes application-specific, large, read-only files efficiently.

DistributedCache is a facility provided by the MapReduce framework to cache files (text, archives, jars and so on) needed by applications.

Applications specify the files to be cached via urls (hdfs://) in the Job. The DistributedCache assumes that the files specified via hdfs:// urls are already present on the FileSystem.

The framework will copy the necessary files to the worker node before any tasks for the job are executed on that node. Its efficiency stems from the fact that the files are only copied once per job and the ability to cache archives which are un-archived on the workers.

DistributedCache tracks the modification timestamps of the cached files. Clearly the cache files should not be modified by the application or externally while the job is executing.

DistributedCache can be used to distribute simple, read-only data/text files and more complex types such as archives and jars. Archives (zip, tar, tgz and tar.gz files) are un-archived at the worker nodes. Files have execution permissions set.

The files/archives can be distributed by setting the property mapreduce.job.cache.{files |archives}. If more than one file/archive has to be distributed, they can be added as comma separated paths. The properties can also be set by APIs Job.addCacheFile(URI)/ Job.addCacheArchive(URI) and Job.setCacheFiles(URI[])/ Job.setCacheArchives(URI[]) where URI is of the form hdfs://host:port/absolute-path#link-name. In Streaming, the files can be distributed through command line option -cacheFile/-cacheArchive.

The DistributedCache can also be used as a rudimentary software distribution mechanism for use in the map and/or reduce tasks. It can be used to distribute both jars and native libraries. The Job.addArchiveToClassPath(Path) or Job.addFileToClassPath(Path) api can be used to cache files/jars and also add them to the classpath of child-jvm. The same can be done by setting the configuration properties mapreduce.job.classpath.{files |archives}. Similarly the cached files that are symlinked into the working directory of the task can be used to distribute native libraries and load them.

by
Наша команда искусных специалистов проштудирована предоставлять вам прогрессивные методы, которые не только предоставят долговечную безопасность от холодных воздействий, но и преподнесут вашему зданию модный вид.
Мы трудимся с новыми веществами, ассигнуруя долгий срок службы эксплуатации и прекрасные результирующие показатели. Изоляция фасада – это не только экономия ресурсов на обогреве, но и заботливость о природной среде. Сберегательные технологические решения, какие мы используем, способствуют не только личному, но и поддержанию природной среды.
Самое первоочередное: <a href=https://ppu-prof.ru/>Утепление фасада цена за кв м</a> у нас составляет всего от 1250 рублей за квадратный метр! Это доступное решение, которое преобразит ваш домашний уголок в настоящий приятный локал с небольшими затратами.
Наши произведения – это не просто изолирование, это составление площади, в где каждый член преломляет ваш уникальный стиль. Мы возьмем во внимание все все твои требования, чтобы осуществить ваш дом еще более комфортным и привлекательным.
Подробнее на <a href=https://ppu-prof.ru/>официальном сайте</a>
Не откладывайте дела о своем доме на потом! Обращайтесь к экспертам, и мы сделаем ваш обиталище не только тепличным, но и стильным. Заинтересовались? Подробнее о наших сервисах вы можете узнать на сайте компании. Добро пожаловать в пределы удобства и стандартов.

Related questions

0 votes
asked Jan 8, 2020 in Big Data | Hadoop by GeorgeBell
0 votes
asked Jan 8, 2020 in Big Data | Hadoop by GeorgeBell
...