PrepAway - Latest Free Exam Questions & Answers

Which command gathers these into a single file on your local file system?

You have just run a MapReduce job to filter user messages to only those of a selected
geographical region. The output for this job is in a directory named westUsers, located just below
your home directory in HDFS. Which command gathers these into a single file on your local file
system?

PrepAway - Latest Free Exam Questions & Answers

A.
Hadoop fs –getmerge –R westUsers.txt

B.
Hadoop fs –getemerge westUsers westUsers.txt

C.
Hadoop fs –cp westUsers/* westUsers.txt

D.
Hadoop fs –get westUsers westUsers.txt

5 Comments on “Which command gathers these into a single file on your local file system?

  1. Gaurav says:

    B is the correct answer and one more command you can try i.e

    hadoop fs -cat /user/*.txt | hadoop fs -put – /user/abc

    which will merge all files with .txt extension under user directory to a new file abc under the same user directory.




    0



    0
  2. Trung Phan says:

    -getmerge option to the hadoop fs command
    gets all the files in the directory specified in the source pattern and
    merges them into a single file on the local filesystem




    0



    0

Leave a Reply

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