猪错误2998:未处理的内部错误。静态(错误名称:com / company / Static) [英] Pig ERROR 2998: Unhandled internal error. Static (wrong name: com/company/Static)

查看:135
本文介绍了猪错误2998:未处理的内部错误。静态(错误名称:com / company / Static)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Pig脚本,它返回一个常量字符串值。当我尝试使用以下命令运行脚本时,出现Pig ERROR 2998:

pre $ 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;

size = FOREACH装载GENERATE Static(request);

DUMP大小;

导致错误的原因是什么?

解决方案

它似乎是一个没有人捕获的 java.lang.NoClassDefFoundError 错误。错误本身是由于jvm无法找到您请求的类而发生的。



具体来说,您似乎缺少jar中所需的目录结构。 com.company.Static (即 Static.class 文件)应位于 com / company 目录在jar中。有关更多详情,请参阅此 SO问题



要快速解决问题,请查看如何创建一个包结构的jar文件


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?

解决方案

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.

这篇关于猪错误2998:未处理的内部错误。静态(错误名称:com / company / Static)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆