gpt4 book ai didi

java - Hadoop获取文件未找到异常

转载 作者:行者123 更新时间:2023-12-02 21:51:37 25 4
gpt4 key购买 nike

我正在尝试使用单节点hadoop集群运行示例程序。
运行示例程序(JAR文件)时出现异常。

我将core-site.xml配置为localhost:9000。我将文本文件正确放入了HDFS,可以通过执行hadoop dfs -ls /tmp命令进行查看。

谢谢。

13/11/27 05:47:52 INFO mapred.LocalJobRunner: Map task executor complete. 13/11/27 05:47:52 WARN mapred.LocalJobRunner: job_local617545423_0001 java.lang.Exception: java.io.FileNotFoundException: /tmp/Jetty_0_0_0_0_50090_secondary__y6aanv (Is a directory) at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:354) Caused by: java.io.FileNotFoundException: /tmp/Jetty_0_0_0_0_50090_secondary__y6aanv (Is a directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:138) at org.apache.hadoop.fs.RawLocalFileSystem$TrackingFileInputStream.(RawLocalFileSystem.java:71) at org.apache.hadoop.fs.RawLocalFileSystem$LocalFSFileInputStream.(RawLocalFileSystem.java:107) at org.apache.hadoop.fs.RawLocalFileSystem.open(RawLocalFileSystem.java:182) at org.apache.hadoop.fs.ChecksumFileSystem$ChecksumFSInputChecker.(ChecksumFileSystem.java:126) at org.apache.hadoop.fs.ChecksumFileSystem.open(ChecksumFileSystem.java:283) at org.apache.hadoop.fs.FileSystem.open(FileSystem.java:427) at org.apache.hadoop.mapreduce.lib.input.LineRecordReader.initialize(LineRecordReader.java:75) at org.apache.hadoop.mapreduce.lib.input.KeyValueLineRecordReader.initialize(KeyValueLineRecordReader.java:65) at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:521) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:763) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:364) at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:223) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) 13/11/27 05:47:52 INFO mapred.JobClient: map 35% reduce 0%

最佳答案

目录即使在linux文件系统中也不能位于作业的输入路径目录中。

上面的tmp/Jetty_0_0_0_0_50090_secondary__y6aanv (Is a directory) at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:354) Caused by: java.io.FileNotFoundException: /tmp/Jetty_0_0_0_0_50090_secondary__y6aanvJetty_0_0_0_0_50090_secondary__y6aanv是输入路径目录中的目录。

我更改了输入路径,现在可以使用了。

关于java - Hadoop获取文件未找到异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20242184/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com