Pig
  1. Pig
  2. PIG-2101

Registering a Python function in a directory other than the current working directory fails

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.8.1
    • Fix Version/s: None
    • Component/s: impl
    • Labels:
      None

      Description

      In MapReduce mode, if the register command references a directory other than the current one, executing the Python UDF on the backend fails with: Deserialization error: could not instantiate 'org.apache.pig.scripting.jython.JythonFunction' with arguments '[../udfs/python/production.py, production]'

      I assume it is using the path on the backend to try to locate the UDF.

      The script is:

      register '../udfs/python/production.py' using jython as bballudfs;
      players  = load 'baseball' as (name:chararray, team:chararray,
                      pos:bag{t:(p:chararray)}, bat:map[]);
      nonnull  = filter players by bat#'slugging_percentage' is not null and
                      bat#'on_base_percentage' is not null;
      calcprod = foreach nonnull generate name, bballudfs.production(
                      (float)bat#'slugging_percentage',
                      (float)bat#'on_base_percentage');
      dump calcprod;
      

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Alan Gates
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development