Skip to content

Commit

Permalink
Add config options processing for FLUX YAML DLS
Browse files Browse the repository at this point in the history
Configs are now passed via YAML to FluxShellBolt/Spout.

Need to wait for upstream PUSH. 
So far I've created only the issue, since there is a little bug.
https://issues.apache.org/jira/browse/STORM-1870
  • Loading branch information
Darkless012 committed May 30, 2016
1 parent f66794f commit 127ad5a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions streamparse/dsl/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,18 @@ def _spec_to_flux_dict(spec):
raise TypeError('Flux does not currently support ShellBolts '
'with multiple streams. Given: {!r}'
.format(spec))

flux_dict['configMethods'] = []
if spec.config:
import json
dconf = spec.config
if not isinstance(spec.config, dict):
dconf = json.loads(spec.config)
for key, value in dconf.iteritems():
flux_dict['configMethods'].append({
'name': 'addComponentConfig',
"args": [key, value]
})
else:
if spec.component_object.serialized_java is not None:
raise TypeError('Flux does not support specifying serialized '
Expand Down

0 comments on commit 127ad5a

Please sign in to comment.