state.setNimbus(instance.launcherLocalServer(nimbusConf,
new DefaultInimbus()));
state.setZookeeper(zookeeper);
state.setConf(conf);
state.setTmpDir(tmpDirs);
state.setSupervisor(supervisor
.mkSupervisor(supervisorConf, context));
return state;
} catch (Exception e) {
LOG.error("prepare cluster error!", e);
state.clean();