if( cmd.hasOption( GatewayCommandLine.HELP_LONG ) ) {
GatewayCommandLine.printHelp();
} else if( cmd.hasOption( GatewayCommandLine.VERSION_LONG ) ) {
printVersion();
} else if( cmd.hasOption( GatewayCommandLine.REDEPLOY_LONG ) ) {
GatewayConfig config = new GatewayConfigImpl();
redeployTopologies( config, cmd.getOptionValue( GatewayCommandLine.REDEPLOY_LONG ) );
} else {
services = instantiateGatewayServices();
if (services == null) {
log.failedToInstantiateGatewayServices();
}
GatewayConfig config = new GatewayConfigImpl();
if (config.isHadoopKerberosSecured()) {
configureKerberosSecurity( config );
}
Map<String,String> options = new HashMap<String,String>();
options.put(GatewayCommandLine.PERSIST_LONG, Boolean.toString(cmd.hasOption(GatewayCommandLine.PERSIST_LONG)));
services.init(config, options);