转载请注明出处:http://blog.csdn.net/lastsweetop/article/details/9086695
distcp [OPTIONS] <srcurl>* <desturl> OPTIONS: -p[rbugp] Preserve status r: replication number b: block size u: user g: group p: permission -p alone is equivalent to -prbugp -i Ignore failures -log <logdir> Write logs to <logdir> -m <num_maps> Maximum number of simultaneous copies -overwrite Overwrite destination -update Overwrite if src size different from dst size -skipcrccheck Do not use CRC check to determine if src is different from dest. Relevant only if -update is specified -f <urilist_uri> Use list at <urilist_uri> as src list -filelimit <n> Limit the total number of files to be <= n -sizelimit <n> Limit the total size to be <= n bytes -delete Delete the files existing in the dst but not in src -mapredSslConf <f> Filename of SSL configuration for mapper task
13/06/18 10:59:19 INFO tools.DistCp: srcPaths=[hftp://namenode:50070/user/hadoop/input] 13/06/18 10:59:19 INFO tools.DistCp: destPath=hdfs://namenode:9000/user/hadoop/input1 13/06/18 10:59:20 INFO tools.DistCp: hdfs://namenode:9000/user/hadoop/input1 does not exist. 13/06/18 10:59:20 INFO tools.DistCp: sourcePathsCount=3 13/06/18 10:59:20 INFO tools.DistCp: filesToCopyCount=2 13/06/18 10:59:20 INFO tools.DistCp: bytesToCopyCount=1.7m 13/06/18 10:59:20 INFO mapred.JobClient: Running job: job_201306131134_0009 13/06/18 10:59:21 INFO mapred.JobClient: map 0% reduce 0% 13/06/18 10:59:35 INFO mapred.JobClient: map 100% reduce 0%
hadoop distcp webhdfs://namenode:50070/user/hadoop/input webhdfs://namenode:50070/user/hadoop/input1