@Override public int actionVersion() { SliderVersionInfo.loadAndPrintVersionInfo(log); return EXIT_SUCCESS; }
@Override public int actionVersion() { SliderVersionInfo.loadAndPrintVersionInfo(log); return EXIT_SUCCESS; }
/** * this is called by service launcher; when it returns the application finishes * @return the exit code to return by the app * @throws Throwable */ @Override public int runService() throws Throwable { SliderVersionInfo.loadAndPrintVersionInfo(log); //dump the system properties if in debug mode if (log.isDebugEnabled()) { log.debug("System properties:\n" + SliderUtils.propertiesToString(System.getProperties())); } //choose the action String action = serviceArgs.getAction(); List<String> actionArgs = serviceArgs.getActionArgs(); int exitCode; switch (action) { case SliderActions.ACTION_HELP: log.info("{}: {}", getName(), serviceArgs.usage()); exitCode = SliderExitCodes.EXIT_USAGE; break; case SliderActions.ACTION_CREATE: exitCode = createAndRunCluster(actionArgs.get(0)); break; default: throw new SliderException("Unimplemented: " + action); } log.info("Exiting AM; final exit code = {}", exitCode); return exitCode; }
/** * this is called by service launcher; when it returns the application finishes * @return the exit code to return by the app * @throws Throwable */ @Override public int runService() throws Throwable { SliderVersionInfo.loadAndPrintVersionInfo(log); //dump the system properties if in debug mode if (log.isDebugEnabled()) { log.debug("System properties:\n" + SliderUtils.propertiesToString(System.getProperties())); } //choose the action String action = serviceArgs.getAction(); List<String> actionArgs = serviceArgs.getActionArgs(); int exitCode; switch (action) { case SliderActions.ACTION_HELP: log.info("{}: {}", getName(), serviceArgs.usage()); exitCode = SliderExitCodes.EXIT_USAGE; break; case SliderActions.ACTION_CREATE: exitCode = createAndRunCluster(actionArgs.get(0)); break; default: throw new SliderException("Unimplemented: " + action); } log.info("Exiting AM; final exit code = {}", exitCode); return exitCode; }
try { String currentCommandPath = getCurrentCommandPath(); SliderVersionInfo.loadAndPrintVersionInfo(log); String clientConfigPath = getClientConfigPath(); String jdkInfo = getJDKInfo();
try { String currentCommandPath = getCurrentCommandPath(); SliderVersionInfo.loadAndPrintVersionInfo(log); String clientConfigPath = getClientConfigPath(); String jdkInfo = getJDKInfo();