OptionSpec<String> codec = p.accepts("codec", "compression codec")
.withOptionalArg().ofType(String.class);
OptionSet opts = p.parse(args.toArray(new String[0]));
List<String> nargs = opts.nonOptionArguments();
if (nargs.size() != 2) {
err.println("Expected 2 args: from_file to_file (local filenames," +
" Hadoop URI's, or '-' for stdin/stdout");
p.printHelpOn(err);
return 1;