tcount在哪个文件里_WordCount命令找不到文件位置

I run Wordcount in Eclipse and my text file exists in hdfs

我在Eclipse中運行Wordcount,我的文本文件存在於hdfs中

Eclipse shows me this error:

Eclipse向我顯示了這個錯誤:

Input path does not exist: file:/home/hduser/workspace/sample1user/hduser/test1

輸入路徑不存在:file:/ home / hduser / workspace / sample1user / hduser / test1

2 个解决方案

#1

Input path does not exist: file:/home/hduser/workspace/sample1user/hduser/test1

輸入路徑不存在:file:/ home / hduser / workspace / sample1user / hduser / test1

Your error shows that the wordcount is searching for the file in local filesystem and not in hdfs. Try copying the input file in local file system.

您的錯誤顯示wordcount正在本地文件系統中而不是在hdfs中搜索該文件。嘗試在本地文件系統中復制輸入文件。

Post the results for following commands in your question:

在您的問題中發布以下命令的結果:

hdfs dfs -ls /home/hduser/workspace/sample1user/hduser/test1

hdfs dfs -ls /home/hduser/workspace/sample1user/hduser

ls -l /home/hduser/workspace/sample1user/hduser/test1

ls -l /home/hduser/workspace/sample1user/hduser

#2

I too ran into the similar issue..(I am a beginner too) I gave the full hdfs path via Arguments for the Wordcount program like below and it worked (I was running the Pseudo-Distributed mode)

我也遇到了類似的問題..(我也是初學者)我通過Arguments為Wordcount程序提供了完整的hdfs路徑,如下所示,它工作(我運行的是偽分布式模式)

hdfs://krishl@localhost:9000/user/Perumal/Input

hdfs://krish@localhost:9000/user/Perumal/Output

hdfs://krish@localhost:9000 is my hdfs location and My hadoop daemons were running during the testing.

hdfs:// krish @ localhost:9000是我的hdfs位置,我的hadoop守護進程在測試期間運行。

Note: This may not be the best practice but it helped me get started!!

注意:這可能不是最好的做法,但它幫助我開始!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值