Details
Description
Steps:
1) Go to pig editor (plain vanilla cluster - no kerberos, no federation)
2) Load the example:
REGISTER piggybank.jar;
data = LOAD '/user/hue/pig/examples/data/midsummer.txt' as (text:CHARARRAY);
upper_case = FOREACH data GENERATE org.apache.pig.piggybank.evaluation.string.UPPER(text);
STORE upper_case INTO '$output' ;
3) Run the example. Sample succeeds
4) Remove the fully-qualified part of the UPPER function (remove org.apache.pig.piggybank.evaluatino.string.):
REGISTER piggybank.jar;
data = LOAD '/user/hue/pig/examples/data/midsummer.txt' as (text:CHARARRAY);
upper_case = FOREACH data GENERATE UPPER(text);
STORE upper_case INTO '$output' ;
5) Run the example. Sample succeeds.
6) Change "UPPER" to "upper". Notice that "UPPER()" and "upper()" are both available as options in the context-sensitive help list (<CTRL>-<SPACE>).
REGISTER piggybank.jar;
data = LOAD '/user/hue/pig/examples/data/midsummer.txt' as (text:CHARARRAY);
upper_case = FOREACH data GENERATE upper(text);
STORE upper_case INTO '$output' ;
7) Run example. Sample fails:
2013-05-20 09:30:52,057 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: will-cdh43-van-1.ent.cloudera.com:8021
2013-05-20 09:30:57,891 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve upper using imports: [, org.apache.pig.builtin., org.apache.pig.impl.builtin.]