Pig ERROR 2998: Unhandled internal error. Static (wrong name: com/company/Static)

柔情痞子 提交于 2019-12-11 02:21:14

问题


I have a Pig script that returns a constant string value. When I try to run the script with the following command, I get a Pig ERROR 2998:

pig -Dpig.additional.jars=Static.jar -f script.pig -l /dev/null -x local

script.pig

loaded = LOAD 'data/' USING com.twitter.elephantbird.pig.store.LzoPigStorage() AS (request);

loaded = SAMPLE loaded 0.00001;

sized = FOREACH loaded GENERATE Static(request);

DUMP sized;

What's causing the error?


回答1:


It appears to be a java.lang.NoClassDefFoundError error that nobody is catching. The error itself occurs because the jvm cannot find the class you requested.

Specifically, you seem to be missing the required directory structure in the jar. com.company.Static (i.e., the Static.class file) should be located under the com/company directory in the jar. See this other SO question for more details.

For a quick fix, take a look at this question on How to create a jar file with package structure.



来源:https://stackoverflow.com/questions/19124179/pig-error-2998-unhandled-internal-error-static-wrong-name-com-company-static

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!