public static HashSet<H2ONode> parseFlatFileFromString( String s ) { HashSet<H2ONode> h2os = new HashSet<H2ONode>(); InputStream is = new ByteArrayInputStream(s.getBytes()); List<FlatFileEntry> list = parseFlatFile(is); for(FlatFileEntry entry : list) h2os.add(H2ONode.intern(entry.inet, entry.port+1));// use the UDP port here return h2os; }
STATIC_H2OS = parseFlatFile(OPT_ARGS.flatfile);
public static List<FlatFileEntry> parseFlatFile( File f ) { InputStream is = null; try { is = new FileInputStream(f); } catch (Exception e) { Log.die(e.toString()); } return parseFlatFile(is); }
List<FlatFileEntry> list = parseFlatFile(f); for(FlatFileEntry entry : list) h2os.add(H2ONode.intern(entry.inet, entry.port+1));// use the UDP port here
String[] workerArgs = new String[] { "-flatfile", FLATFILE, "-port", "" + PORT }; List<FlatFileEntry> flatfile = H2O.parseFlatFile(new File(FLATFILE)); HashMap<String, Host> hosts = new HashMap<String, Host>(); ArrayList<Node> workers = new ArrayList<Node>();