Skip to content

Commit

Permalink
return nodes from build_cloud_with_hosts for consistency. I'm writing…
Browse files Browse the repository at this point in the history
… h2o.nodes too much, but it's not much stuff.
  • Loading branch information
Kevin Normoyle committed Nov 7, 2014
1 parent ce6bba4 commit 76b0aca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions py/h2o.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,13 @@ def init(*args, **kwargs):
global localhost
localhost = decide_if_localhost()
global nodes
# we go thru the defs above, to do the other stuff like grab h2o_args
# don't really need to assign nodes here since it's done above, and
# build_cloud_with_hosts goes thru build_cloud. But this makes it obvious.
if (localhost):
nodes = build_cloud(*args, **kwargs)
else:
nodes = h2o_hosts.build_cloud_with_hosts(*args, **kwargs)
print "kevin:", len(nodes)


6 changes: 5 additions & 1 deletion py/h2o_hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,8 @@ def build_cloud_with_hosts(node_count=None, **kwargs):
paramsToUse.pop('h2o_per_host')
print "java_heap_GB", paramsToUse['java_heap_GB']
# don't wipe out or create the sandbox. already did here, and put flatfile there
build_cloud(node_count, hosts=hosts, init_sandbox=False, **paramsToUse)
nodes = build_cloud(node_count, hosts=hosts, init_sandbox=False, **paramsToUse)

# we weren't doing this before, but since build_cloud returns nodes
# people might expect this works similarly
return nodes

0 comments on commit 76b0aca

Please sign in to comment.