我们要求在从s3到本地群集的distcp时限制映射器带宽。
所以我从https://repository.cloudera.com下载了hadoop-distcp-2.5.0-cdh5.2.0-1141009.063640-188.jar
然后运行以下distcp命令但出现了一些错误。不知道我做错了什么g
export HADOOP_USER_CLASSPATH_FIRST=true && HADOOP_CLASSPATH=hadoop-distcp-2.5.0-cdh5.2.0-20141009.063640-188.jar hadoop org.apache.hadoop.tools.DistCp -bandwidth 1 s3n://com.xyz/2014/10/23/ hdfs:///user/abc/2014-10-23/
14/11/05 09:54:55 INFO tools.DistCp: Input Options: DistCpOptions{atomicCommit=false, syncFolder=false, deleteMissing=false, ignoreFailures=false, maxMaps=20, sslConfigurationFile='null', copyStrategy='uniformsize', sourceFileListing=null, sourcePaths=[s3n://com.xyz.rtb/2014/10/23], targetPath=hdfs:/user/abc/2014-10-23, targetPathExists=true, preserveRawXattrs=false}
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(Lorg/apache/hadoop/mapreduce/Cluster;Lorg/apache/hadoop/conf/Configuration;)Lorg/apache/hadoop/fs/Path;
at org.apache.hadoop.tools.DistCp.createMetaFolderPath(DistCp.java:379)
at org.apache.hadoop.tools.DistCp.execute(DistCp.java:155)
at org.apache.hadoop.tools.DistCp.run(DistCp.java:121)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.tools.DistCp.main(DistCp.java:401)
任何帮助
答案 0 :(得分:1)
https://groups.google.com/a/cloudera.org/forum/#!topic/cdh-user/Ld60TY_Z-Jg
DistCp2是MR2中的默认和唯一DistCp。它不被称为DistCp2,但只是DistCp。
命令' hadoop distcp'在MR2中运行DistCp2。