nwangtw commented on a change in pull request #2929: Make TopologyBuilder less
permissive
URL: https://github.com/apache/incubator-heron/pull/2929#discussion_r197624107
##########
File path: heronpy/api/topology.py
##########
@@ -194,24 +194,25 @@ def get_heron_options_from_env():
Currently supports the following options natively:
- - `cmdline.topologydefn.tmpdirectory`: the directory to which this
+ - `cmdline.topologydefn.tmpdirectory`: (required) the directory to which
this
topology's defn file is written
- - `cmdline.topology.initial.state`: the initial state of the topology
- - `cmdline.topology.name`: topology name on deployment
+ - `cmdline.topology.initial.state`: (default: "RUNNING") the initial state
of the topology
+ - `cmdline.topology.name`: (default: class name) topology name on
deployment
Returns: map mapping from key to value
"""
- heron_options_raw = os.environ.get("HERON_OPTIONS", None)
+ heron_options_raw = os.environ.get("HERON_OPTIONS")
if heron_options_raw is None:
raise RuntimeError("HERON_OPTIONS environment variable not found")
- ret = {}
- heron_opt_list = heron_options_raw.replace("%%%%", " ").split(',')
- for opt_raw in heron_opt_list:
- opt = opt_raw.split("=")
- if len(opt) == 2:
- ret[opt[0]] = opt[1]
- return ret
+ options = {}
+ for option_line in heron_options_raw.replace("%%%%", " ").split(','):
Review comment:
it does look strange. From the code it seems this is used to support space
in path. And the %%%% can be found in cpp, java and python with code search.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services