PigProgressable object not being set in the EvalFunc
-----------------------------------------------------
Key: PIG-540
URL: https://issues.apache.org/jira/browse/PIG-540
Project: Pig
Issue Type: Bug
Components: impl
Affects Versions: types_branch
Reporter: Viraj Bhat
Fix For: types_branch
The UDF RegexMatcher, reports its progress using the reporter (PigProgressable)
object in the exec method. It seems that the reporter object is not being set
in the EvalFunc and hence the following piece of Pig script runs into problems
in the mapper with the following error.
{code}
register string.jar;
define getCompanyName string.RegexMatcher('www.(.*).com');
a = load '/user/viraj/myurldata.txt' as (url:chararray, count:long);
b = foreach a generate url, getCompanyName(url) as bcookie;
dump b;
{code}
=======================================================================================================================
Error that results from the above script
=======================================================================================================================
2008-11-21 02:17:00,593 [main] ERROR
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.Launcher - Error
message from task (map)
task_200810152105_0170_m_000000java.lang.NullPointerException
at string.RegexMatcher.exec(RegexMatcher.java:50)
at string.RegexMatcher.exec(RegexMatcher.java:30)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:179)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:201)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:230)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:180)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.runPipeline(PigMapBase.java:170)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:158)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$Map.map(PigMapOnly.java:65)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:47)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:227)
at
org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:2209)
=======================================================================================================================
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.