在猪中使用UDF时获取错误1070

时间:2017-10-28 22:28:36

标签: java apache-pig pig-udf

运行pig脚本时出现错误2017-10-29 03:34:22,212 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 6, column 13> Syntax error, unexpected symbol at or near ''/home/harsh/Hunny/HadoopPractice/Pig/Upper.jar''

我如何注册和定义我的UDF:

REGISTER '/home/harsh/Hunny/HadoopPractice/Pig/Upper.jar';
DEFINE changeCase Upper();

我的猪脚本:

A = load 'customer1.txt' USING PigStorage(',') as (name:chararray);
B = foreach A generate changeCase(name);

我的瓶子位置:

/home/harsh/Hunny/HadoopPractice/Pig

感谢任何帮助: 提前致谢

1 个答案:

答案 0 :(得分:1)

最后遗漏了一个分号。

REGISTER '/home/harsh/Hunny/HadoopPractice/Pig/Upper.jar';