Error: java.io.IOException: File copy failed: hdfs://192.168.101.31:8020/apps/hive/warehouse/orig.db/ods_alarm_detail_808/pdt=2023-05-01/phour=00/events-k2-00.1682870400001. gz --> hdfs://172.21.194.129:8020/distcp/apps/hive/warehouse/orig.db/ods_alarm_detail_808/pdt=2023-05-01/phour=00/events-k2-00.1682870400001.gz at org.apache.hadoop.tools.mapred.CopyMapper.copyFileWithRetry(CopyMapper.java:299) at org.apache.hadoop.tools.mapred.CopyMapper.map(CopyMapper.java:266) at org.apache.hadoop.tools.mapred.CopyMapper.map(CopyMapper.java:52) at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:170) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1869) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164) Caused by: java.io.IOException: Couldn't run retriable-command: Copying hdfs://192.168.101.31:8020/apps/hive/warehouse/orig.db/ods_alarm_detail_808/pdt=2023-05-01/phour=00/e vents-k2-00.1682870400001.gz to hdfs://172.21.194.129:8020/distcp/apps/hive/warehouse/orig.db/ods_alarm_detail_808/pdt=2023-05-01/phour=00/events-k2-00.1682870400001.gz at org.apache.hadoop.tools.util.RetriableCommand.execute(RetriableCommand.java:101) at org.apache.hadoop.tools.mapred.CopyMapper.copyFileWithRetry(CopyMapper.java:296)
时间: 2023-11-18 12:02:21 浏览: 215
这个错误是由于 Hadoop DistCp 在尝试将文件从源位置复制到目标位置时失败了。可能原因包括源文件不存在、权限问题、网络问题等。建议您先检查源文件是否存在,以及您是否有足够的权限来复制文件。如果这些都没问题,可能是由于网络问题导致的,您可以尝试重新运行 DistCp 命令,或者检查网络连接是否正常。另外,还可以查看 Hadoop 和 HDFS 的日志,以便更好地了解这个错误的具体原因。
阅读全文