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

Javascript support for Pig embedding and UDFs in scripting languages

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0
    • 0.9.0
    • impl
    • None
    • Patch Available
    • 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

      Attachments

        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

            People

              julienledem Julien Le Dem
              julienledem Julien Le Dem
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: