@Override protected int processOptions(CommandLine cmd) throws Exception { int result = super.processOptions(cmd); if (result != 0) { return result; } if (!cmd.hasOption(zkOption.getOpt())) { String message; zkConnectionString = System.getenv(ZK_ENV_VAR); if (zkConnectionString != null) { message = "Using ZooKeeper connection string specified in " + ZK_ENV_VAR + ": " + zkConnectionString; } else { zkConnectionString = DEFAULT_ZK_CONNECT; message = "ZooKeeper connection string not specified, using default: " + DEFAULT_ZK_CONNECT; } // to stderr: makes that sample config dumps of e.g. tester tool do not start with this line, and // can thus be redirected to a file without further editing. System.err.println(message); System.err.println(); } else { zkConnectionString = cmd.getOptionValue(zkOption.getOpt()); } return 0; } }
int result = processOptions(cmd); if (result != 0) { return result;