Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2796

Flux: Provide means for invoking static factory methods and improve non-primitive number handling

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0, 1.1.1, 1.2.0, 1.0.6
    • 2.0.0, 1.2.0
    • Flux

    Description

      Provide a means to invoke static factory methods for flux components. E.g:

      Java signature:

      public static MyComponent newInstance(String... params)
      

      Yaml:

          className: "org.apache.storm.flux.test.MyComponent"
          factory: "newInstance"
          factoryArgs: ["a", "b", "c"]
      

      Also include a fix for non-primitive numbers, so constructs like the following work:

      Java constructor:

      public TestBolt(Long l){}
      

      Yaml:

        - id: "bolt-4"
          className: "org.apache.storm.flux.test.TestBolt"
          constructorArgs:
            - 10
          parallelism: 1
      

      (Before fix the above would fail because snakeyaml would convert `10` to an Integer.)

      Attachments

        Issue Links

          Activity

            People

              ptgoetz P. Taylor Goetz
              ptgoetz P. Taylor Goetz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 50m
                  2h 50m