What is the function of getLocalCacheArchives method?

0 votes

I am new to Java & Hadoop. I was going through a DistributedCache MapReduce program. In the program in code, I found a setup method and I couldn’t understand the below code.

Configuration conf = context.getConfiguration();
Path[] localpath = DistributedCache.getLocalCacheArchives(conf);

Can anyone help me in understanding the getLocalCacheArchives() method. I tried but couldn’t find the method in MapReduce documentation.

Apr 29, 2018 in Big Data Hadoop by coldcode
• 1,980 points
20 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

We use distributed cache to share those files which are needed by all nodes across the cluster. The file is made available to all the slave node before the execution of MapReduce code.

In the main method (addCacheFile) we share those files that is to be shared across the cluster, whereas in the setup method we retrieve those files using getLocalCacheArchives() method.

Go through this distributed cache official documentation:

https://hadoop.apache.org/docs/r2.6.1/api/org/apache/hadoop/filecache/DistributedCache.html

answered Apr 29, 2018 by Shubham
• 12,150 points

Related Questions In Big Data Hadoop

0 votes
11 answers

What is the default Namenode port of HDFS. Is it 8020 or 9000 or 50070?

8020/9000 hadoop namenode metadata port number. or ...READ MORE

answered Dec 31, 2018 in Big Data Hadoop by SM
5,497 views
0 votes
1 answer

What is the benefit of using CDH over other Distributors?

CDH is basically a packaged deal, where ...READ MORE

answered Mar 29, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
30 views
0 votes
1 answer

What is the use of sequence file in Hadoop?

Sequence files are binary files containing serialized ...READ MORE

answered Apr 5, 2018 in Big Data Hadoop by Ashish
• 2,630 points
391 views
0 votes
12 answers

What is Zookeeper? What is the purpose of Zookeeper in Hadoop Ecosystem?

Hey, Apache Zookeeper says that it is a ...READ MORE

answered Apr 29 in Big Data Hadoop by Gitika
• 7,580 points
2,419 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,030 points
1,655 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
8,024 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
560 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.