nerdexam
Cloudera

CCA-410 · Question #39

You are running two Hadoop clusters(cluster1 and cluster2), they run identical versions of hadoop. You want to copy the data inside /home/foo/cluster1 to cluster2 into the directory /home/bar/ What…

The correct answer is D. $ hadoop distCp hdfs://cluster1/home/foo hdfs://cluster2/home/bar/. The most common invocation of DistCp is an inter-cluster copy: bash$ hadoop distcp hdfs://nn1:8020/foo/bar \ hdfs://nn2:8020/bar/foo This will expand the namespace under /foo/bar on nn1 into a temporary file, partition its contents among a set of map tasks, and start a copy on…

Deployment

Question

You are running two Hadoop clusters(cluster1 and cluster2), they run identical versions of hadoop. You want to copy the data inside /home/foo/cluster1 to cluster2 into the directory /home/bar/ What is the correct distcp syntax to copy one directory tree from one cluster to the other cluster?

Options

  • A$ distCp hdfs://cluster1/home/foo hdfs://cluster2/home/bar/
  • B$ distCp cluster1:/home/foo cluster2:/home/bar/
  • C$ Hadoop distCp cluster1:/home/foo cluster2:/home/bar/
  • D$ hadoop distCp hdfs://cluster1/home/foo hdfs://cluster2/home/bar/

How the community answered

(42 responses)
  • A
    5% (2)
  • B
    12% (5)
  • C
    5% (2)
  • D
    79% (33)

Explanation

The most common invocation of DistCp is an inter-cluster copy: bash$ hadoop distcp hdfs://nn1:8020/foo/bar \ hdfs://nn2:8020/bar/foo This will expand the namespace under /foo/bar on nn1 into a temporary file, partition its contents among a set of map tasks, and start a copy on each TaskTracker from nn1 to nn2. Note that DistCp expects absolute paths. * DistCp (distributed copy) is a tool used for large inter/intra-cluster copying.

Topics

#distcp#cluster-to-cluster copy#HDFS commands#command syntax

Community Discussion

No community discussion yet for this question.

Full CCA-410 Practice