/** * Parse the user-specified options, get the generic options, and modify * configuration accordingly. * * @param opts Options to use for parsing args. * @param args User-specified arguments * @return true if the parse was successful */ private boolean parseGeneralOptions(Options opts, String[] args) throws IOException { opts = buildGeneralOptions(opts); CommandLineParser parser = new GnuParser(); boolean parsed = false; try { commandLine = parser.parse(opts, preProcessForWindows(args), true); processGeneralOptions(commandLine); parsed = true; } catch(ParseException e) { LOG.warn("options parsing failed: "+e.getMessage()); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("general options are: ", opts); } return parsed; }
/** * Parse the user-specified options, get the generic options, and modify * configuration accordingly * @param conf Configuration to be modified * @param args User-specified arguments * @return Command-specific arguments */ private String[] parseGeneralOptions(Options opts, Configuration conf, String[] args) { opts = buildGeneralOptions(opts); CommandLineParser parser = new GnuParser(); try { commandLine = parser.parse(opts, args, true); processGeneralOptions(conf, commandLine); return commandLine.getArgs(); } catch(ParseException e) { LOG.warn("options parsing failed: "+e.getMessage()); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("general options are: ", opts); } return args; }
/** * Parse the user-specified options, get the generic options, and modify * configuration accordingly * @param conf Configuration to be modified * @param args User-specified arguments * @return Command-specific arguments */ private String[] parseGeneralOptions(Options opts, Configuration conf, String[] args) { opts = buildGeneralOptions(opts); CommandLineParser parser = new GnuParser(); try { commandLine = parser.parse(opts, args, true); processGeneralOptions(conf, commandLine); return commandLine.getArgs(); } catch(ParseException e) { LOG.warn("options parsing failed: "+e.getMessage()); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("general options are: ", opts); } return args; }
/** * Parse the user-specified options, get the generic options, and modify * configuration accordingly * @param opts Options to use for parsing args. * @param conf Configuration to be modified * @param args User-specified arguments */ private void parseGeneralOptions(Options opts, Configuration conf, String[] args) throws IOException { opts = buildGeneralOptions(opts); CommandLineParser parser = new GnuParser(); try { commandLine = parser.parse(opts, preProcessForWindows(args), true); processGeneralOptions(conf, commandLine); } catch(ParseException e) { LOG.warn("options parsing failed: "+e.getMessage()); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("general options are: ", opts); } }
/** * Parse the user-specified options, get the generic options, and modify * configuration accordingly * @param opts Options to use for parsing args. * @param conf Configuration to be modified * @param args User-specified arguments */ private void parseGeneralOptions(Options opts, Configuration conf, String[] args) throws IOException { opts = buildGeneralOptions(opts); CommandLineParser parser = new GnuParser(); try { commandLine = parser.parse(opts, preProcessForWindows(args), true); processGeneralOptions(conf, commandLine); } catch(ParseException e) { LOG.warn("options parsing failed: "+e.getMessage()); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("general options are: ", opts); } }
/** * Parse the user-specified options, get the generic options, and modify * configuration accordingly * @param opts Options to use for parsing args. * @param conf Configuration to be modified * @param args User-specified arguments */ private void parseGeneralOptions(Options opts, Configuration conf, String[] args) throws IOException { opts = buildGeneralOptions(opts); CommandLineParser parser = new GnuParser(); try { commandLine = parser.parse(opts, preProcessForWindows(args), true); processGeneralOptions(conf, commandLine); } catch(ParseException e) { LOG.warn("options parsing failed: "+e.getMessage()); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("general options are: ", opts); } }
/** * Parse the user-specified options, get the generic options, and modify * configuration accordingly * @param opts Options to use for parsing args. * @param conf Configuration to be modified * @param args User-specified arguments */ private void parseGeneralOptions(Options opts, Configuration conf, String[] args) throws IOException { opts = buildGeneralOptions(opts); CommandLineParser parser = new GnuParser(); try { commandLine = parser.parse(opts, preProcessForWindows(args), true); processGeneralOptions(conf, commandLine); } catch(ParseException e) { LOG.warn("options parsing failed: "+e.getMessage()); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("general options are: ", opts); } }