当从s3到本地集群进行distcp时,需要限制Map器的带宽。
所以我下载了hadoop-distcp-2.5.0-cdh5.2.0-20141009.063640-188.jarhttps://repository.cloudera.com
以下是链接:https://repository.cloudera.com/artifactory/public/org/apache/hadoop/hadoop-distcp/2.5.0-cdh5.2.0-snapshot/hadoop-distcp-2.5.0-cdh5.2.0-20141009.063640-188.jar
然后按照distcp命令运行,但出现了一些错误。不知道我是否做错了什么
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)
有什么帮助吗
1条答案
按热度按时间njthzxwz1#
https://groups.google.com/a/cloudera.org/forum/#!主题/cdh用户/ld60tyïU z-jg
distcp2是默认值,也是mr2中唯一的distcp。它不是distcp2,而是distcp。
mr2中的命令'hadoop distcp'运行distcp2。