Skip to content

Instantly share code, notes, and snippets.

@sorenmacbeth
Created September 14, 2011 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorenmacbeth/1217049 to your computer and use it in GitHub Desktop.
Save sorenmacbeth/1217049 to your computer and use it in GitHub Desktop.
def launch_slaves(self, instance_template):
instances = self.cluster.check_running(NAMENODE, 1)
if not instances:
return
master = instances[0]
for role in (NAMENODE, JOBTRACKER):
singleton_host_env = "%s_HOST=%s" % \
(self._sanitize_role_name(role), master.public_ip)
instance_template.add_env_strings(singleton_host_env)
print singleton_host_env
self._launch_instances(instance_template)
self._attach_storage(instance_template.roles)
self._print_master_url()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment