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,090 points
878 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,490 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
62,875 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,350 points
654 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 6, 2018 in Big Data Hadoop by Ashish
• 2,650 points
9,582 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, 2019 in Big Data Hadoop by Gitika
• 65,770 points
29,881 views
+1 vote
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
• 11,380 points
11,029 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,832 views
–1 vote
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,350 points
4,612 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

What is the command to check the number of cores in Spark?

Go to your Spark Web UI & ...READ MORE

answered May 17, 2018 in Big Data Hadoop by Shubham
• 13,490 points
7,025 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP