(!conf.getString(SparrowConf.DEPLYOMENT_MODE, "").equals("standalone"))) {
throw new ConfigurationException("Mutliple NodeMonitors only allowed " +
"in standalone deployment");
}
if (nmPorts.length == 0) {
(new NodeMonitorThrift()).initialize(conf,
NodeMonitorThrift.DEFAULT_NM_THRIFT_PORT,
NodeMonitorThrift.DEFAULT_INTERNAL_THRIFT_PORT);
}
else {
for (int i = 0; i < nmPorts.length; i++) {
(new NodeMonitorThrift()).initialize(conf,
Integer.parseInt(nmPorts[i]), Integer.parseInt(inPorts[i]));
}
}
SchedulerThrift scheduler = new SchedulerThrift();