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

Add finalize() interface to UDF

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.2.0
    • impl
    • None

    Description

      I would like to have a finalize() method to UDF, which will be called when no more inputs and the UDF will be killed. The finalize() method should allow to generate extra output, which in many cases could benefit aggregations.

      There are couple of application that can benefit from this feature.

      One of the example is, in some UDFs, I need to open some resource(i. e. local file) and when the task finishes, I need to close the resource.

      Another example is, in one of my application, I do statistics for a list of categories and I need to generate a summary category and attach to the end of the table. With the finalize method, I could achieve this in an efficient and neat way.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yhan Yiping Han
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: