我尝试使用以下命令将 FTP 数据复制到 HDFS,
hadoop distcp ftp://ftp.ncdc.noaa.gov/pub/data/noaa/1901/ data/noaa/1901/
这是我收到的错误
15/03/04 11:29:13 INFO tools.DistCp: Input Options: DistCpOptions{atomicCommit=false, syncFolder=false, deleteMissing=false, ignoreFailures=false, maxMaps=20, sslConfigurationFile='null', copyStrategy='uniformsize', sourceFileListing=null, sourcePaths=[ftp://ftp.ncdc.noaa.gov/pub/data/noaa/1901], targetPath=data/noaa/1901, targetPathExists=false, preserveRawXattrs=false}
15/03/04 11:29:13 INFO client.RMProxy: Connecting to ResourceManager at m-hadoop-master.c.swift-influence-86909.internal/10.240.143.253:8032
15/03/04 11:29:14 ERROR tools.DistCp: Exception encountered
java.io.IOException: Login failed on server - ftp.ncdc.noaa.gov, port - 21 as user 'null'
at org.apache.hadoop.fs.ftp.FTPFileSystem.connect(FTPFileSystem.java:144)
at org.apache.hadoop.fs.ftp.FTPFileSystem.getFileStatus(FTPFileSystem.java:405)
at org.apache.hadoop.fs.Globber.getFileStatus(Globber.java:57)
at org.apache.hadoop.fs.Globber.glob(Globber.java:252)
at org.apache.hadoop.fs.FileSystem.globStatus(FileSystem.java:1625)
at org.apache.hadoop.tools.GlobbedCopyListing.doBuildListing(GlobbedCopyListing.java:77)
at org.apache.hadoop.tools.CopyListing.buildListing(CopyListing.java:84)
at org.apache.hadoop.tools.DistCp.createInputFileListing(DistCp.java:353)
at org.apache.hadoop.tools.DistCp.execute(DistCp.java:160)
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)