def _ssh_slave_addresses(ssh_bin, master_address, ec2_key_pair_file):
 if ((not ec2_key_pair_file) or (not os.path.exists(ec2_key_pair_file))):
  return []
 cmd = "hadoop dfsadmin -report | grep ^Name | cut -f2 -d: | cut -f2 -d' '"
 args = [('bash -c "%s"' % cmd)]
 ips = to_string(_check_output(*_ssh_run(ssh_bin, master_address, ec2_key_pair_file, args)))
 return [ip for ip in ips.split('\n') if ip]

def _ssh_slave_addresses ( ssh_bin , master_address , ec2_key_pair_file ) : if ( ( not ec2_key_pair_file ) or ( not os . path . exists ( ec2_key_pair_file ) ) ) : return [ ] cmd = "hadoop dfsadmin -report | grep ^Name | cut -f2 -d: | cut -f2 -d' '" args = [ ( 'bash -c "%s"' % cmd ) ] ips = to_string ( _check_output ( * _ssh_run ( ssh_bin , master_address , ec2_key_pair_file , args ) ) ) return [ ip for ip in ips . split ( '\n' ) if ip ]
get the ip addresses of the slave nodes .