/** * Main entry point of {@link AlluxioLogServer}. * * @param args command line arguments that will be parsed to initialize {@link AlluxioLogServer} */ public static void main(String[] args) { final AlluxioLogServerProcess process = new AlluxioLogServerProcess(args[0]); ProcessUtils.stopProcessOnShutdown(process); ProcessUtils.run(process); }
/** * Starts the Alluxio master. * * @param args command line arguments, should be empty */ public static void main(String[] args) { if (args.length != 0) { LOG.info("java -cp {} {}", RuntimeConstants.ALLUXIO_JAR, AlluxioMaster.class.getCanonicalName()); System.exit(-1); } CommonUtils.PROCESS_TYPE.set(CommonUtils.ProcessType.MASTER); MasterProcess process; try { process = AlluxioMasterProcess.Factory.create(); } catch (Throwable t) { ProcessUtils.fatalError(LOG, t, "Failed to create master process"); // fatalError will exit, so we shouldn't reach here. throw t; } // Register a shutdown hook for master, so that master closes the journal files when it // receives SIGTERM. ProcessUtils.stopProcessOnShutdown(process); ProcessUtils.run(process); }
/** * Main entry point of {@link AlluxioLogServer}. * * @param args command line arguments that will be parsed to initialize {@link AlluxioLogServer} */ public static void main(String[] args) { final AlluxioLogServerProcess process = new AlluxioLogServerProcess(args[0]); ProcessUtils.stopProcessOnShutdown(process); ProcessUtils.run(process); }
/** * Starts the Alluxio master. * * @param args command line arguments, should be empty */ public static void main(String[] args) { if (args.length != 0) { LOG.info("java -cp {} {}", RuntimeConstants.ALLUXIO_JAR, AlluxioMaster.class.getCanonicalName()); System.exit(-1); } CommonUtils.PROCESS_TYPE.set(CommonUtils.ProcessType.MASTER); MasterProcess process; try { process = MasterProcess.Factory.create(); } catch (Throwable t) { ProcessUtils.fatalError(LOG, t, "Failed to create master process"); // fatalError will exit, so we shouldn't reach here. throw t; } // Register a shutdown hook for master, so that master closes the journal files when it // receives SIGTERM. ProcessUtils.stopProcessOnShutdown(process); ProcessUtils.run(process); }