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

Allow user defined plan optimizer rules

    Details

    • Type: Improvement
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.14.0, 0.15.0
    • Fix Version/s: None
    • Component/s: impl
    • Labels:
    • Patch Info:
      Patch Available
    • Release Note:
      Unlock user defined plan optimizer rule + slightly change the loaded builtin rules
    • Flags:
      Patch

      Description

      Pig has only builtin plan optimizer rules. Adding the possibility to load user defined and implemented Rule make it easier for people to work on plan optimizers. The idea behind this is to be able to push/propose new optimizer rule through the piggybank without touching pig core classes. I'm preparing some optimisations and so need this patch 1st.

      User defined rules are classes that extend the abstract Rule class and configured through the pig property pig.optimizer.user.defined.rules by setting it to one or more named classes splitted using regex [,;:\t ]. These classes will be loaded using PigContext.getClassLoader() and if that fails use the current thread context class loader. Classes can have a PigContext one argument constructor, and if it does not exists the default constructor is used.

        Attachments

        1. PIG-4598.patch
          12 kB
          Remi Catherinot

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rcatherinot Remi Catherinot
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: