Search in sources :

Example 1 with GenericOptionsParser

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;
}
Also used : StartupOption(org.apache.hadoop.hdfs.server.common.HdfsServerConstants.StartupOption) IOException(java.io.IOException) GenericOptionsParser(org.smartdata.server.utils.GenericOptionsParser)

Aggregations

IOException (java.io.IOException)1 StartupOption (org.apache.hadoop.hdfs.server.common.HdfsServerConstants.StartupOption)1 GenericOptionsParser (org.smartdata.server.utils.GenericOptionsParser)1