return new ServerOptionsProcessorResponse(new HelpOptionExecutor(serverName, options));
return new ServerOptionsProcessorResponse(new HelpOptionExecutor(serverName, options));
ServerOptionsProcessorResponse parse(String[] argv) { try { commandLine = new GnuParser().parse(options, argv); // Process --hiveconf // Get hiveconf param values and set the System property values Properties confProps = commandLine.getOptionProperties("hiveconf"); for (String propKey : confProps.stringPropertyNames()) { // save logging message for log4j output latter after log4j initialize properly debugMessage.append("Setting " + propKey + "=" + confProps.getProperty(propKey) + ";\n"); System.setProperty(propKey, confProps.getProperty(propKey)); } // Process --help if (commandLine.hasOption('H')) { return new ServerOptionsProcessorResponse(new HelpOptionExecutor(serverName, options)); } // Process --deregister if (commandLine.hasOption("deregister")) { return new ServerOptionsProcessorResponse(new DeregisterOptionExecutor( commandLine.getOptionValue("deregister"))); } } catch (ParseException e) { // Error out & exit - we were not able to parse the args successfully System.err.println("Error starting HiveServer2 with given arguments: "); System.err.println(e.getMessage()); System.exit(-1); } // Default executor, when no option is specified return new ServerOptionsProcessorResponse(new StartOptionExecutor()); }
ServerOptionsProcessorResponse parse(String[] argv) { try { commandLine = new GnuParser().parse(options, argv); // Process --hiveconf // Get hiveconf param values and set the System property values Properties confProps = commandLine.getOptionProperties("hiveconf"); for (String propKey : confProps.stringPropertyNames()) { // save logging message for log4j output latter after log4j initialize properly debugMessage.append("Setting " + propKey + "=" + confProps.getProperty(propKey) + ";\n"); System.setProperty(propKey, confProps.getProperty(propKey)); } // Process --help if (commandLine.hasOption('H')) { return new ServerOptionsProcessorResponse(new HelpOptionExecutor(serverName, options)); } // Process --deregister if (commandLine.hasOption("deregister")) { return new ServerOptionsProcessorResponse(new DeregisterOptionExecutor( commandLine.getOptionValue("deregister"))); } } catch (ParseException e) { // Error out & exit - we were not able to parse the args successfully System.err.println("Error starting HiveServer2 with given arguments: "); System.err.println(e.getMessage()); System.exit(-1); } // Default executor, when no option is specified return new ServerOptionsProcessorResponse(new StartOptionExecutor()); }
public ServerOptionsProcessorResponse parse(String[] argv) { try { commandLine = new GnuParser().parse(options, argv); // Process --hiveconf // Get hiveconf param values and set the System property values Properties confProps = commandLine.getOptionProperties("hiveconf"); for (String propKey : confProps.stringPropertyNames()) { // save logging message for log4j output latter after log4j initialize properly debugMessage.append("Setting " + propKey + "=" + confProps.getProperty(propKey) + ";\n"); System.setProperty(propKey, confProps.getProperty(propKey)); } // Process --help if (commandLine.hasOption('H')) { return new ServerOptionsProcessorResponse(new HelpOptionExecutor(serverName, options)); } } catch (ParseException e) { // Error out & exit - we were not able to parse the args successfully System.err.println("Error starting HiveServer2 with given arguments: "); System.err.println(e.getMessage()); System.exit(-1); } // Default executor, when no option is specified return new ServerOptionsProcessorResponse(new StartOptionExecutor()); }
public ServerOptionsProcessorResponse parse(String[] argv) { try { commandLine = new GnuParser().parse(options, argv); // Process --hiveconf // Get hiveconf param values and set the System property values Properties confProps = commandLine.getOptionProperties("hiveconf"); for (String propKey : confProps.stringPropertyNames()) { // save logging message for log4j output latter after log4j initialize properly debugMessage.append("Setting " + propKey + "=" + confProps.getProperty(propKey) + ";\n"); System.setProperty(propKey, confProps.getProperty(propKey)); } // Process --help if (commandLine.hasOption('H')) { return new ServerOptionsProcessorResponse(new HelpOptionExecutor(serverName, options)); } } catch (ParseException e) { // Error out & exit - we were not able to parse the args successfully System.err.println("Error starting HiveServer2 with given arguments: "); System.err.println(e.getMessage()); System.exit(-1); } // Default executor, when no option is specified return new ServerOptionsProcessorResponse(new StartOptionExecutor()); }