猪的ERROR 2998 0.13.0

时间:2017-03-13 14:06:43

标签: hadoop hbase apache-pig bigdata

我刚装猪。当我跑猪时,我会得到无穷无尽的错误,如

2017-03-13 17:27:14,262 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2998: Unhandled internal error. Could not initialize class org.apache.pig.tools.pigstats.PigStatsUtil

猪日志代码: Hadoop版本为hadoop0.20.2cdh3u6

    ERROR 2998: Unhandled internal error. org/apache/hadoop/mapreduce/task/JobContextImpl

java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/task/JobContextImpl
        at org.apache.pig.tools.pigstats.PigStatsUtil.<clinit>(PigStatsUtil.java:68)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:64)
        at org.apache.pig.Main.run(Main.java:542)
        at org.apache.pig.Main.main(Main.java:156)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapreduce.task.JobContextImpl
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        ... 9 more
================================================================================
Pig Stack Trace
---------------
ERROR 2998: Unhandled internal error. Could not initialize class org.apache.pig.tools.pigstats.PigStatsUtil

java.lang.NoClassDefFoundError: Could not initialize class org.apache.pig.tools.pigstats.PigStatsUtil
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:64)
        at org.apache.pig.Main.run(Main.java:542)
        at org.apache.pig.Main.main(Main.java:156)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:197)

我不明白它是什么意思。

1 个答案:

答案 0 :(得分:1)

java.lang.NoClassDefFoundError意味着您在启动Pig作业时缺少类路径上的一些hadoop库 可能是这个lib https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-mapred/0.22.0缺失,因为它包含无法加载的类(org.apache.hadoop.mapreduce.task.JobContextImpl)