我是新來的豬。我在豬身上寫了一個UDF,並將其用於我的豬腳本。但它給了以下錯誤Udf的豬的錯誤
ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve UserDefined.PartsOfSpeech using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
這裏是我的UDF代碼
public String exec(Tuple input) throws IOException {
//my code here
}
這裏是我的豬腳本
REGISTER /home/bigdata/NetBeansProjects/UserDefined/dist/UserDefined.jar
a = load '/user/bigdata/json' using TextLoader() as (input:chararray);
b = foreach a GENERATE UserDefined.PartsOfSpeech(input);
在上面的代碼用戶自定義爲我的包名和PartsOfSpeech是我的課名稱