[ 
https://issues.apache.org/jira/browse/STORM-2796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

P. Taylor Goetz updated STORM-2796:
-----------------------------------
    Description: 
Provide a means to invoke static factory methods for flux components. E.g:

Java signature:
{code}
public static MyComponent newInstance(String... params)
{code}

Yaml:

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

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

Java constructor:
{code}
public TestBolt(Long l){}
{code}

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

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


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

Java signature:
{code}
public static MyComponent newInstance(String... params)
{code}

Yaml:

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


> Flux: Provide means for invoking static factory methods and improve 
> non-primitive number handling
> -------------------------------------------------------------------------------------------------
>
>                 Key: STORM-2796
>                 URL: https://issues.apache.org/jira/browse/STORM-2796
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: Flux
>    Affects Versions: 2.0.0, 1.1.1, 1.2.0, 1.0.6
>            Reporter: P. Taylor Goetz
>            Assignee: P. Taylor Goetz
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Provide a means to invoke static factory methods for flux components. E.g:
> Java signature:
> {code}
> public static MyComponent newInstance(String... params)
> {code}
> Yaml:
> {code}
>     className: "org.apache.storm.flux.test.MyComponent"
>     factory: "newInstance"
>     factoryArgs: ["a", "b", "c"]
> {code}
> Also include a fix for non-primitive numbers, so constructs like the 
> following work:
> Java constructor:
> {code}
> public TestBolt(Long l){}
> {code}
> Yaml:
> {code}
>   - id: "bolt-4"
>     className: "org.apache.storm.flux.test.TestBolt"
>     constructorArgs:
>       - 10
>     parallelism: 1
> {code}
> (Before fix the above would fail because snakeyaml would convert `10` to an 
> Integer.)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to