我正在使用Grid.startNodes(java.util.Collection,java.util.Map,boolean,int,int) 如下所述:http://gridgain.com/api/javadoc/org/gridgain/grid/Grid.html#startNodes(java.util.Collection,java.util.Map,boolean,int,int)
我正在使用的代码:
GridConfiguration cfg = GridCfgGenerator.GetConfigurations(true);
Grid grid = GridGain.start(cfg);
Collection<Map<String,Object>> coll = new ArrayList<>();
Map<String, Object> host = new HashMap<String, Object>();
//host.put("host", "23.101.201.136");
host.put("host", "10.0.0.4");
host.put("port", 22);
host.put("uname", "username");
host.put("passwd", "password");
host.put("nodes", 7);
//host.put("ggHome", null); /* don't state so that it will use GRIDGAIN_HOME enviroment var */
host.put("cfg", "/config/partitioned.xml");
coll.add(host);
GridFuture f = grid.startNodes(coll, null, false, 3600 * 3600, 4);
System.out.println("before f.get()");
f.get();
我不太确定如何调试这个,因为我没有错误
答案 0 :(得分:1)
从startNodes(..)
方法返回的未来成功完成意味着您的本地节点已建立SSH会话并为将要启动的每个节点执行命令。但是成功执行命令并不意味着节点将实际启动,因为它可能由于多种原因而失败(例如,错误的GRIDGAIN_HOME
)。
您应该检查以下内容:
GRIDGAIN_HOME/work/log
目录?如果是,请检查它们 - 启动过程中可能存在异常。