[ 
https://issues.apache.org/jira/browse/STORM-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470344#comment-16470344
 ] 

Stig Rohde Døssing commented on STORM-3066:
-------------------------------------------

I don't think you can refer to elements in a list right now. Here's the code 
doing property substitution 
https://github.com/apache/storm/blob/master/flux/flux-core/src/main/java/org/apache/storm/flux/parser/FluxParser.java#L153.
 As you can see it's fairly straightforward replacement of dollar-brace 
patterns. You could probably add support for list/map lookups if you wanted to 
by modifying the linked code.

> Storm Flux variable substitution
> --------------------------------
>
>                 Key: STORM-3066
>                 URL: https://issues.apache.org/jira/browse/STORM-3066
>             Project: Apache Storm
>          Issue Type: Bug
>            Reporter: Calvin Chen
>            Priority: Critical
>
> we are using flux to submit storm topology, for topology yml file, we need 
> substitute variables, from 
> [https://github.com/apache/storm/tree/master/flux], it says variable can be 
> substituted in format of ${variable.name}, my question is, in my case, 
> variable is a list, and I only want to get first element of the list, how can 
> I do it?
>  I try to use ${variable.0} and ${variable}[0], it doesn't work, after 
> substitution, the result is element_name.0 or element_name[0], which is not I 
> expected(expected one should be element_name), please let me know how to 
> specify the first element of a list in flux.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to