我正在运行Map reduce,它将扫描hbase并收集所需的数据。 hadoop有7TB数据,还有10TB免费。 HBase有大约2亿条记录。在完成99.44%5个地图任务后扫描HBase时,仍然处于运行状态,完成0.0%。完全没有尝试过这些过程。它永远保持在那种状态。因此我的MR根本没有完成。从我的本地机器上运行这个MR指向一个小表时它运行正常。任何想法,以及它为何陷入困境以及如何解决它?提前致谢
我在Job tracker log中注意到的异常
2012-03-27 13:27:56,117 INFO org.apache.hadoop.mapred.JobInProgress: Choosing rack-local task task_201203271236_0001_m_000955
2012-03-27 13:27:56,699 INFO org.apache.hadoop.mapred.JobInProgress: Task 'attempt_201203271236_0001_m_000865_0' has completed task_201203271236_0001_m_000865 successfully.
2012-03-27 13:27:56,699 INFO org.apache.hadoop.mapred.ResourceEstimator: completedMapsUpdates:910 completedMapsInputSize:910 completedMapsOutputSize:60738755
2012-03-27 13:27:56,700 INFO org.apache.hadoop.mapred.JobInProgress: Choosing a non-local task task_201203271236_0001_m_000707
2012-03-27 13:27:56,700 INFO org.apache.hadoop.mapred.JobTracker: Adding task 'attempt_201203271236_0001_m_000707_0' to tip task_201203271236_0001_m_000707, for tracker 'tracker_nafhdi12809mwh.io.askjeeves.info:localhost.localdomain/127.0.0.1:55120'
2012-03-27 13:27:56,704 INFO org.apache.hadoop.ipc.Server: IPC Server handler 4 on 9001, call heartbeat(org.apache.hadoop.mapred.TaskTrackerStatus@17a323c0, false, false, true, 1022) from 10.76.99.112:49072: error: java.io.IOException: java.lang.NullPointerException
java.io.IOException: java.lang.NullPointerException
at org.apache.hadoop.mapred.JobInProgress.getMatchingLevelForNodes(JobInProgress.java:1235)
at org.apache.hadoop.mapred.JobInProgress.addRunningTaskToTIP(JobInProgress.java:1317)
at org.apache.hadoop.mapred.JobInProgress.obtainNewMapTask(JobInProgress.java:957)
at org.apache.hadoop.mapred.DefaultTaskSelector.obtainNewMapTask(DefaultTaskSelector.java:63)
at org.apache.hadoop.mapred.FairScheduler.assignTasks(FairScheduler.java:265)
at org.apache.hadoop.mapred.JobTracker.heartbeat(JobTracker.java:2586)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:961)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:957)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:955)
2012-03-27 13:27:56,713 INFO org.apache.hadoop.mapred.JobTracker: Adding task 'attempt_201203271236_0001_m_000865_1' to tip task_201203271236_0001_m_000865, for tracker 'tracker_nafhdi12809mwh.io.askjeeves.info:localhost.localdomain/127.0.0.1:55120'
2012-03-27 13:27:56,714 INFO org.apache.hadoop.mapred.JobInProgress: Choosing data-local task task_201203271236_0001_m_000865
2012-03-27 13:27:56,714 INFO org.apache.hadoop.mapred.JobTracker: Removed completed task 'attempt_201203271236_0001_m_000865_0' from 'tracker_nafhdi12809mwh.io.askjeeves.info:localhost.localdomain/127.0.0.1:55120'
2012-03-27 13:27:56,841 INFO org.apache.hadoop.mapred.JobInProgress: Task 'attempt_201203271236_0001_m_000877_0' has completed task_201203271236_0001_m_000877 successfully.
2012-03-27 13:27:56,841 INFO org.apache.hadoop.mapred.ResourceEstimator: completedMapsUpdates:911 completedMapsInputSize:911 completedMapsOutputSize:60800404
2012-03-27 13:27:56,842 INFO org.apache.hadoop.mapred.JobInProgress: Choosing a non-local task task_201203271236_0001_m_000753
2012-03-27 13:27:56,842 INFO org.apache.hadoop.mapred.JobTracker: Adding task 'attempt_201203271236_0001_m_000753_0' to tip task_201203271236_0001_m_000753, for tracker 'tracker_nafhdi12711mwh.io.askjeeves.info:localhost.localdomain/127.0.0.1:46050'
2012-03-27 13:27:56,842 INFO org.apache.hadoop.ipc.Server: IPC Server handler 3 on 9001, call heartbeat(org.apache.hadoop.mapred.TaskTrackerStatus@22911fb5, false, false, true, 1023) from 10.76.99.79:37228: error: java.io.IOException: java.lang.NullPointerException
java.io.IOException: java.lang.NullPointerException
答案 0 :(得分:0)
您可以尝试运行hbase hbck
以查看您的表格是否有任何问题
答案 1 :(得分:0)
终于想通了。问题出在topology.data文件中,当从windows机器移动文件时,windows字符被附加到行尾。因此,在hadoop代码的getMatchingLevelForNodes()方法中,节点变为空,因此发生了空指针异常。谢谢你们的支持:)