I was trying out Pig UDF samples from Hadoop definitive guide. Every time i tried executing
com.hadoopbook.pig.IsGoodQuality
UDF like this i got
ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve com.hadoop.pig.IsGoodQuality using imports:
error
grunt< filtered_records = filter records by temp != 9999 and com.hadoop.pig.IsGoodQuality(quality);
2014-05-17 15:39:10,445 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve com.hadoop.pig.IsGoodQuality using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
Details at logfile: /usr/lib/hue/pig_1400366300986.log
The way to fix that problem is by using
-Dpig.additional.jars=pig-examples.jar
while starting pig
pig -Dpig.additional.jars=pig-examples.jar