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
• 2,020 points
40 views

1 answer to this question.

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
• 13,310 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
13,254 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
57 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
1,666 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
• 25,360 points
5,675 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
• 10,730 points
3,355 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
16,621 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
1,214 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer