分享

eclipse 运行远程的hadoop程序出现 class not found如何解决?

wlzxnet 发表于 2015-7-28 14:34:21 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 2 21527
eclipse 运行远程的hadoop程序出现 class not found如何解决?
15/07/28 14:19:05 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
15/07/28 14:19:06 INFO client.RMProxy: Connecting to ResourceManager at yfl/192.168.1.107:8032
15/07/28 14:19:06 WARN mapreduce.JobSubmitter: No job jar file set.  User classes may not be found. See Job or Job#setJar(String).
15/07/28 14:19:06 INFO input.FileInputFormat: Total input paths to process : 3
15/07/28 14:19:07 INFO mapreduce.JobSubmitter: number of splits:3
15/07/28 14:19:07 INFO Configuration.deprecation: mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
15/07/28 14:19:07 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1438059452044_0019
15/07/28 14:19:07 INFO mapred.YARNRunner: Job jar is not present. Not adding any jar to the list of resources.
15/07/28 14:19:07 INFO impl.YarnClientImpl: Submitted application application_1438059452044_0019
15/07/28 14:19:07 INFO mapreduce.Job: The url to track the job: http://aaa:8088/proxy/application_1438059452044_0019/
15/07/28 14:19:07 INFO mapreduce.Job: Running job: job_1438059452044_0019
15/07/28 14:19:14 INFO mapreduce.Job: Job job_1438059452044_0019 running in uber mode : false
15/07/28 14:19:14 INFO mapreduce.Job:  map 0% reduce 0%
15/07/28 14:19:22 INFO mapreduce.Job: Task Id : attempt_1438059452044_0019_m_000001_0, Status : FAILED
Error: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class com.mapreduce.score.Score$Map not found
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2074)
    at org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContextImpl.java:186)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:742)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.lang.ClassNotFoundException: Class com.mapreduce.score.Score$Map not found
    at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1980)
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2072)
    ... 8 more

15/07/28 14:19:22 INFO mapreduce.Job: Task Id : attempt_1438059452044_0019_m_000002_0, Status : FAILED
Error: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class com.mapreduce.score.Score$Map not found
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2074)
    at org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContextImpl.java:186)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:742)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.lang.ClassNotFoundException: Class com.mapreduce.score.Score$Map not found
    at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1980)
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2072)
    ... 8 more

15/07/28 14:19:22 INFO mapreduce.Job: Task Id : attempt_1438059452044_0019_m_000000_0, Status : FAILED
Error: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class com.mapreduce.score.Score$Map not found
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2074)
    at org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContextImpl.java:186)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:742)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.lang.ClassNotFoundException: Class com.mapreduce.score.Score$Map not found
    at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1980)
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2072)
    ... 8 more


已有(2)人评论

跳转到指定楼层
Alkaloid0515 发表于 2015-7-28 18:29:17
首先确定包全部加入,然后确定是否引用了第三方包最后核实, com.mapreduce.score.Score类中是否有map函数或则map类

Class com.mapreduce.score.Score$Map

回复

使用道具 举报

wlzxnet 发表于 2015-7-28 19:46:23
Alkaloid0515 发表于 2015-7-28 18:29
首先确定包全部加入,然后确定是否引用了第三方包最后核实, com.mapreduce.score.Score类中是否有map函数 ...

有的,直接导出jar包,用hadoop 命令行的形式在hadoop上可以运行的。

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条