Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-540

PigProgressable object not being set in the EvalFunc

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.2.0
    • Fix Version/s: 0.2.0
    • Component/s: impl
    • Labels:
      None

      Description

      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.

      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;
      

      =======================================================================================================================
      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)
      =======================================================================================================================

        Attachments

        1. myurldata.txt
          0.1 kB
          Viraj Bhat
        2. RegexMatcher.java
          2 kB
          Viraj Bhat

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              viraj Viraj Bhat
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: