运行wordcount时显示Could not obtain block

该文章接上面hadoop运行wordcount时卡住不动,接着下面

hadoop@ubuntu118:~/hadoop-1.0.2$ bin/hadoop dfsadmin -safemode leave

Warning: $HADOOP_HOME is deprecated.

Safe mode is OFF

hadoop@ubuntu118:~/hadoop-1.0.2$ bin/hadoop jar hadoop-examples-1.0.2.jar wordcount file fileout66

Warning: $HADOOP_HOME is deprecated.

d****hdfs://192.168.0.118:9000/user/hadoop/file

12/09/10 18:35:52 INFO input.FileInputFormat: Total input paths to process : 2

12/09/10 18:35:53 INFO util.NativeCodeLoader: Loaded the native-hadoop library

12/09/10 18:35:53 WARN snappy.LoadSnappy: Snappy native library not loaded

12/09/10 18:35:53 INFO mapred.JobClient: Running job: job_201209101835_0001

12/09/10 18:35:54 INFO mapred.JobClient:  map 0% reduce 0%

12/09/10 18:36:17 INFO mapred.JobClient: Task Id : attempt_201209101835_0001_m_000000_0, Status : FAILED

java.io.IOException: Could not obtain block: blk_-7132067374412134968_1005 file=/user/hadoop/file/file2

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:2266)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:2060)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:2221)

        at java.io.DataInputStream.read(DataInputStream.java:83)

        at org.apache.hadoop.util.LineReader.readLine(LineReader.java:134)

        at org.apache.hadoop.mapreduce.lib.input.LineRecordReader.nextKeyValue(LineRecordReader.java:97)

        at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)

        at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)

        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)

        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)

        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)

        at org.apache.hadoop.mapred.Child$4.run(Child.java:255)

        at java.security.AccessController.doPrivileged(Native Method)

        at javax.security.auth.Subject.doAs(Subject.java:396)

        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)

        at org.apache.hadoop.mapred.Child.main(Child.java:249)

12/09/10 18:36:20 INFO mapred.JobClient: Task Id : attempt_201209101835_0001_m_000001_0, Status : FAILED

java.io.IOException: Could not obtain block: blk_-4697097477082743821_1006 file=/user/hadoop/file/file1

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:2266)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:2060)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:2221)

        at java.io.DataInputStream.read(DataInputStream.java:83)

        at org.apache.hadoop.util.LineReader.readLine(LineReader.java:134)

        at org.apache.hadoop.mapreduce.lib.input.LineRecordReader.nextKeyValue(LineRecordReader.java:97)

        at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)

        at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)

        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)

        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)

        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)

        at org.apache.hadoop.mapred.Child$4.run(Child.java:255)

        at java.security.AccessController.doPrivileged(Native Method)

        at javax.security.auth.Subject.doAs(Subject.java:396)

        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)

        at org.apache.hadoop.mapred.Child.main(Child.java:249)

12/09/10 18:36:35 INFO mapred.JobClient: Task Id : attempt_201209101835_0001_m_000000_1, Status : FAILED

java.io.IOException: Could not obtain block: blk_-7132067374412134968_1005 file=/user/hadoop/file/file2

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:2266)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:2060)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:2221)

        at java.io.DataInputStream.read(DataInputStream.java:83)

        at org.apache.hadoop.util.LineReader.readLine(LineReader.java:134)

        at org.apache.hadoop.mapreduce.lib.input.LineRecordReader.nextKeyValue(LineRecordReader.java:97)

        at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)

        at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)

        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)

        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)

        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)

        at org.apache.hadoop.mapred.Child$4.run(Child.java:255)

        at java.security.AccessController.doPrivileged(Native Method)

        at javax.security.auth.Subject.doAs(Subject.java:396)

        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)

        at org.apache.hadoop.mapred.Child.main(Child.java:249)

12/09/10 18:36:35 INFO mapred.JobClient: Task Id : attempt_201209101835_0001_m_000001_1, Status : FAILED

java.io.IOException: Could not obtain block: blk_-4697097477082743821_1006 file=/user/hadoop/file/file1

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:2266)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:2060)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:2221)

        at java.io.DataInputStream.read(DataInputStream.java:83)

        at org.apache.hadoop.util.LineReader.readLine(LineReader.java:134)

        at org.apache.hadoop.mapreduce.lib.input.LineRecordReader.nextKeyValue(LineRecordReader.java:97)

        at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)

        at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)

        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)

        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)

        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)

        at org.apache.hadoop.mapred.Child$4.run(Child.java:255)

        at java.security.AccessController.doPrivileged(Native Method)

        at javax.security.auth.Subject.doAs(Subject.java:396)

        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)

        at org.apache.hadoop.mapred.Child.main(Child.java:249)

12/09/10 18:36:50 INFO mapred.JobClient: Task Id : attempt_201209101835_0001_m_000000_2, Status : FAILED

java.io.IOException: Could not obtain block: blk_-7132067374412134968_1005 file=/user/hadoop/file/file2

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:2266)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:2060)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:2221)

        at java.io.DataInputStream.read(DataInputStream.java:83)

        at org.apache.hadoop.util.LineReader.readLine(LineReader.java:134)

        at org.apache.hadoop.mapreduce.lib.input.LineRecordReader.nextKeyValue(LineRecordReader.java:97)

        at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)

        at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)

        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)

        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)

        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)

        at org.apache.hadoop.mapred.Child$4.run(Child.java:255)

        at java.security.AccessController.doPrivileged(Native Method)

        at javax.security.auth.Subject.doAs(Subject.java:396)

        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)

        at org.apache.hadoop.mapred.Child.main(Child.java:249)

12/09/10 18:36:50 INFO mapred.JobClient: Task Id : attempt_201209101835_0001_m_000001_2, Status : FAILED

java.io.IOException: Could not obtain block: blk_-4697097477082743821_1006 file=/user/hadoop/file/file1

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:2266)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:2060)

        at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:2221)

        at java.io.DataInputStream.read(DataInputStream.java:83)

        at org.apache.hadoop.util.LineReader.readLine(LineReader.java:134)

        at org.apache.hadoop.mapreduce.lib.input.LineRecordReader.nextKeyValue(LineRecordReader.java:97)

        at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:532)

        at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)

        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)

        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)

        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)

        at org.apache.hadoop.mapred.Child$4.run(Child.java:255)

        at java.security.AccessController.doPrivileged(Native Method)

        at javax.security.auth.Subject.doAs(Subject.java:396)

        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)

        at org.apache.hadoop.mapred.Child.main(Child.java:249)

12/09/10 18:37:12 INFO mapred.JobClient: Job complete: job_201209101835_0001

12/09/10 18:37:12 INFO mapred.JobClient: Counters: 6

12/09/10 18:37:12 INFO mapred.JobClient:   Job Counters 

12/09/10 18:37:12 INFO mapred.JobClient:     SLOTS_MILLIS_MAPS=115005

12/09/10 18:37:12 INFO mapred.JobClient:     Total time spent by all reduces waiting after reserving slots (ms)=0

12/09/10 18:37:12 INFO mapred.JobClient:     Total time spent by all maps waiting after reserving slots (ms)=0

12/09/10 18:37:12 INFO mapred.JobClient:     Launched map tasks=8

12/09/10 18:37:12 INFO mapred.JobClient:     SLOTS_MILLIS_REDUCES=0

12/09/10 18:37:12 INFO mapred.JobClient:     Failed map tasks=1

执行文件file里面文件权限问题,查看里面的文件后发现其中的文件没有执行权限,但修改后发现还是没有执行权限。无奈执行重新上传文件上去hdfs,之后运行正常。

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏闻道于事

js登录滑动验证,不滑动无法登陆

js的判断这里是根据滑块的位置进行判断,应该是用一个flag判断 <%@ page language="java" contentType="text/html...

1.2K8
来自专栏码匠的流水账

聊聊spring cloud的AsyncLoadBalancerAutoConfiguration

本文主要研究一下AsyncLoadBalancerAutoConfiguration

1221
来自专栏SAP最佳业务实践

SAP S/4 HANA新变化-MM物料管理

Co-Deployment of SAP SRM 集成SRM The functional scope of SAPSupplier Relationship...

4134
来自专栏c#开发者

在DataGrid中选择,确认,删除多行复选框列表

在DataGrid中选择,确认,删除多行复选框列表 Selecting, Confirming & Deleting Mul...

3787
来自专栏SAP最佳业务实践

SAP S/4 HANA新变化-CO物料帐(for Ver.1610)

Material Ledger Actual Costing has been activated already in the system before t...

7705
来自专栏码匠的流水账

聊聊rocketmq的RequestTask

org/apache/rocketmq/remoting/netty/RequestTask.java

2062
来自专栏智能计算时代

Best Bluemix Content

image.png Watson Services for Bluemix Sample Apps: Watson Films App (Video) Wats...

2804
来自专栏智能计算时代

Comparison of Apache Stream Processing Frameworks: Part 1

A couple of months ago we were discussing the reasons behind increasing demand f...

4929
来自专栏小鹏的专栏

ubuntu下C++如何调用python程序,gdb调试C++代码

Linux下gdb调试C++代码:http://jingyan.baidu.com/article/acf728fd464984f8e410a369.html ...

3239
来自专栏数据之美

Hive & Performance 学习笔记

注:本文来源于 Hortonworks 的 Adam Muise 在 July 23 2013 日的 Toronto Hadoop User Group 大会...

4085

扫码关注云+社区

领取腾讯云代金券