Pig
  1. Pig
  2. PIG-1794

Javascript support for Pig embedding and UDFs in scripting languages

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.9.0
    • Component/s: impl
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Hadoop Flags:
      Reviewed

      Description

      The attached patch proposes a javascript implementation for Pig embedding and UDFs in scripting languages.
      It is similar to the Jython implementation and uses Rhino provided in the JDK.
      some differences:

      • output schema is provided by: <functionName>.outSchema="<schema>" as javascript does not have annotations or decorators but functions are first class objects
      • tuples are converted to objects using the input schema (the other way around using the output schema)

      The attached patch is not final yet. In particular it lacks unit tests.
      See test/org/apache/pig/test/data/tc.js for the "transitive closure" example

      See the following JIRAs for more context:
      https://issues.apache.org/jira/browse/PIG-928
      https://issues.apache.org/jira/browse/PIG-1479

      1. jsScripting.patch
        44 kB
        Julien Le Dem
      2. jsScripting-2.patch
        58 kB
        Julien Le Dem
      3. jsScripting-3.patch
        62 kB
        Julien Le Dem
      4. jsScripting-4.patch
        64 kB
        Julien Le Dem
      5. jsScripting-5.patch
        64 kB
        Julien Le Dem
      6. jsScripting-6.patch
        66 kB
        Julien Le Dem

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Julien Le Dem
              Reporter:
              Julien Le Dem
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development