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

Introduce possibility to invoke Java static method

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.2.0
    • Fix Version/s: None
    • Component/s: bundle, coordinator, workflow
    • Labels:
      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

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

              Dates

              • Created:
                Updated: