myeclipse下執行程式報錯IO異常。hadoop查看也報錯的解決。

來源:互聯網
上載者:User
$ bin/hadoop fs -cat /tmp/wordcount/word.txt12/06/29 18:07:53 INFO hdfs.DFSClient: No node available for block: blk_-6169034246478912245_1004 file=/tmp/wordcount/word.txt12/06/29 18:07:53 INFO hdfs.DFSClient: Could not obtain block blk_-6169034246478912245_1004 from any node:  java.io.IOException: No live nodes contain current block12/06/29 18:07:56 INFO hdfs.DFSClient: No node available for block: blk_-6169034246478912245_1004 file=/tmp/wordcount/word.txt12/06/29 18:07:56 INFO hdfs.DFSClient: Could not obtain block blk_-6169034246478912245_1004 from any node:  java.io.IOException: No live nodes contain current block12/06/29 18:07:59 INFO hdfs.DFSClient: No node available for block: blk_-6169034246478912245_1004 file=/tmp/wordcount/word.txt12/06/29 18:07:59 INFO hdfs.DFSClient: Could not obtain block blk_-6169034246478912245_1004 from any node:  java.io.IOException: No live nodes contain current block12/06/29 18:08:02 WARN hdfs.DFSClient: DFS Read: java.io.IOException: Could not obtain block: blk_-6169034246478912245_1004 file=/tmp/wordcount/word.txt        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1812)        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1638)        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1767)        at java.io.DataInputStream.read(DataInputStream.java:83)        at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:47)        at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:85)        at org.apache.hadoop.fs.FsShell.printToStdout(FsShell.java:114)        at org.apache.hadoop.fs.FsShell.access$100(FsShell.java:49)        at org.apache.hadoop.fs.FsShell$1.process(FsShell.java:352)        at org.apache.hadoop.fs.FsShell$DelayedExceptionThrowing.globAndProcess(FsShell.java:1898)        at org.apache.hadoop.fs.FsShell.cat(FsShell.java:346)        at org.apache.hadoop.fs.FsShell.doall(FsShell.java:1543)        at org.apache.hadoop.fs.FsShell.run(FsShell.java:1761)        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)        at org.apache.hadoop.fs.FsShell.main(FsShell.java:1880)cat: Could not obtain block: blk_-6169034246478912245_1004 file=/tmp/wordcount/word.txt

解決方案:將hadoop關閉重啟。

$ bin/stop-all.sh

$ bin/start-all.sh

$ bin/hadoop fs -ls /tmp/wordcount/

$ bin/hadoop fs -cat  /tmp/wordcount/word.txt

這次就ok了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.