Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flux doesn't support array of component references passed as contructor arg #14

Open
grantnd opened this issue Jul 6, 2015 · 2 comments

Comments

@grantnd
Copy link

grantnd commented Jul 6, 2015

When specifying a component such as myComponent in the following config yaml:

- components
  - id: "referencedComponent"
    className: "com.test.Foo"
    ...
  - id: "myComponent"
    className: "com.test.MyClass"
    constructorArgs:
      - [ ref: "referencedComponent" ]
      - "bar"

The reference in the list passed as the first contructor arg isn't dereferenced. Then when an attempt is made to instantiate MyClass in org.apache.storm.flux.FluxBuilder.buildObject, the first parameter is passed as an ArrayList of LinkedHashMap and an exception is thrown.

I can look at fixing this and making a pull request. Should that be done over in the main Storm project now that Flux is an external?

Alternatively, would you consider Flux providing the option of using Spring as a way to load components? e.g.

components:
   - springDefinition: "/path/to/springDefinition.xml"
@ptgoetz
Copy link
Owner

ptgoetz commented Jul 7, 2015

Hi @grantnd,

Yes, since this is incorporated into main Storm project, all modifications should take place there.

Also, could you provide the constructor signature of the class you are trying to use?

@grantnd
Copy link
Author

grantnd commented Jul 9, 2015

Sure thing, in the above example it would be:

public MyClass(List<Foo> foos, String someString) { ... }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants