Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-2557

Introduce possibility to invoke Java static method

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.2.0
    • None
    • bundle, coordinator, workflow
    • None

    Description

      Please introduce possibility to call any Java static method in application classpath by reflection.

      Option 1 - New Basic Oozie/EL Function

      These function should provide a possibility to specify input arguments for target Java static method.

      Example:

      • function signature
        Type —> String, int, boolean, double
        
        Type callStaticMethod(String clazz, String method, [Type arg1, [Type argN])
        
      • function usage
        ${ callStaticMethod('java.lang.Integer', 'valueOf', '10') }
        
      Option 2 - Introduce scriptlets like in JSP

      Use special character % for it. It should be possible to mix it with Oozie/EL.

      Example:

      %{ java.lang.Integer.valueOf('10') }
      %{ java.lang.Integer.valueOf(${someStringValue}) }
      

      It will bring a lot of benefits due the list of available EL functions isn't very wide.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nvolynets Nazar Volynets
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: