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 –get westUsers westUsers.txt

C.
Hadoop fs –getemerge westUsers westUsers.txt

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

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

  1. toyhoshi says:

    getmerge

    Usage: hadoop fs -getmerge [-nl]

    Takes a source directory and a destination file as input and concatenates files in src into the destination local file. Optionally -nl can be set to enable adding a newline character (LF) at the end of each file. -skip-empty-file can be used to avoid unwanted newline characters in case of empty files.

    Examples:

    hadoop fs -getmerge -nl /src /opt/output.txt
    hadoop fs -getmerge -nl /src/file1.txt /src/file2.txt /output.txt

    Exit Code:

    Returns 0 on success and non-zero on error.




    0



    0

Leave a Reply to ArasBav Cancel reply

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