PrepAway - Latest Free Exam Questions & Answers

What is the result when you execute: hadoop jar SampleJar MyClass on a client machine?

Your cluster is configured with HDFS and MapReduce version 2 (MRv2) on YARN. What is the
result when you execute: hadoop jar SampleJar MyClass on a client machine?

PrepAway - Latest Free Exam Questions & Answers

A.
SampleJar.Jar is sent to the ApplicationMaster which allocates a container for SampleJar.Jar

B.
Sample.jar is placed in a temporary directory in HDFS

C.
SampleJar.jar is sent directly to the ResourceManager

D.
SampleJar.jar is serialized into an XML file which is submitted to the ApplicatoionMaster

11 Comments on “What is the result when you execute: hadoop jar SampleJar MyClass on a client machine?

  1. Dev says:

    B is the correct answer, jar file will go to tmp folder in hdfs:

    [hduser@cdh-master hadoop]$ hadoop fs -ls /tmp/hadoop-yarn/staging/hduser/.staging/job_1441659980760_0001
    Found 4 items
    -rw-r–r– 2 hduser supergroup 270322 2015-09-08 12:31 /tmp/hadoop-yarn/staging/hduser/.staging/job_1441659980760_0001/job.jar
    -rw-r–r– 2 hduser supergroup 2021 2015-09-08 12:31 /tmp/hadoop-yarn/staging/hduser/.staging/job_1441659980760_0001/job.split
    -rw-r–r– 2 hduser supergroup 575 2015-09-08 12:31 /tmp/hadoop-yarn/staging/hduser/.staging/job_1441659980760_0001/job.splitmetainfo
    -rw-r–r– 2 hduser supergroup 87561 2015-09-08 12:31 /tmp/hadoop-yarn/staging/hduser/.staging/job_1441659980760_0001/job.xml




    0



    0
  2. Trung Phan says:

    it should be B:

    from the book “The Definitive Guide, 4th Edt”

    Figure 7-1:

    Copies the resources needed to run the job, including the job JAR file, the configuration file, and the computed input splits, to the shared filesystem (e.g., HDFS) in a directory named.

    The job JAR is copied with a high replication factor (controlled by the mapreduce.client.submit.file.replication property, which defaults to 10) so that there are lots of copies across the cluster for the node managers to access when they run tasks for the job.




    0



    0

Leave a Reply

Your email address will not be published. Required fields are marked *