use of org.smartdata.server.utils.GenericOptionsParser in project SSM by Intel-bigdata.
the class SmartServer method createSSM.
/**
* Create SSM instance and launch the daemon threads.
*
* @param args
* @param conf
* @return
*/
public static SmartServer createSSM(String[] args, SmartConf conf) throws Exception {
if (args == null) {
args = new String[0];
}
StringUtils.startupShutdownMessage(SmartServer.class, args, LOG);
if (args != null) {
if (parseHelpArgument(args, USAGE, System.out, true)) {
return null;
}
// TODO: handle args
// Parse out some generic args into Configuration.
GenericOptionsParser hParser = new GenericOptionsParser(conf, args);
args = hParser.getRemainingArgs();
// Parse the rest, NN specific args.
StartupOption startOpt = parseArguments(args);
}
SmartServer ssm = new SmartServer(conf);
try {
ssm.runSSMDaemons();
} catch (IOException e) {
ssm.shutdown();
throw e;
}
return ssm;
}
Aggregations