/** * Print a log message for starting up and shutting down * @param clazz the class of the server * @param args arguments * @param LOG the target log object */ public static void startupShutdownMessage(Class<?> clazz, String[] args, final org.slf4j.Logger LOG) { startupShutdownMessage(clazz, args, LogAdapter.create(LOG)); }
/** * Print a log message for starting up and shutting down * @param clazz the class of the server * @param args arguments * @param LOG the target log object */ public static void startupShutdownMessage(Class<?> clazz, String[] args, final org.apache.commons.logging.Log LOG) { startupShutdownMessage(clazz, args, LogAdapter.create(LOG)); }
static JobHistoryServer launchJobHistoryServer(String[] args) { Thread. setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler()); StringUtils.startupShutdownMessage(JobHistoryServer.class, args, LOG); JobHistoryServer jobHistoryServer = null; try { jobHistoryServer = new JobHistoryServer(); ShutdownHookManager.get().addShutdownHook( new CompositeServiceShutdownHook(jobHistoryServer), SHUTDOWN_HOOK_PRIORITY); YarnConfiguration conf = new YarnConfiguration(new JobConf()); new GenericOptionsParser(conf, args); jobHistoryServer.init(conf); jobHistoryServer.start(); } catch (Throwable t) { LOG.fatal("Error starting JobHistoryServer", t); ExitUtil.terminate(-1, "Error starting JobHistoryServer"); } return jobHistoryServer; }
public static void main(String[] args) throws Exception { StringUtils.startupShutdownMessage(JournalNode.class, args, LOG); try { System.exit(ToolRunner.run(new JournalNode(), args)); } catch (Throwable e) { LOG.error("Failed to start journalnode.", e); terminate(-1, e); } }
/** */ public static void main(String argv[]) throws Exception { if (DFSUtil.parseHelpArgument(argv, NameNode.USAGE, System.out, true)) { System.exit(0); } try { StringUtils.startupShutdownMessage(NameNode.class, argv, LOG); NameNode namenode = createNameNode(argv, null); if (namenode != null) { namenode.join(); } } catch (Throwable e) { LOG.error("Failed to start namenode.", e); terminate(1, e); } }
public static void secureMain(String args[], SecureResources resources) { int errorCode = 0; try { StringUtils.startupShutdownMessage(DataNode.class, args, LOG); DataNode datanode = createDataNode(args, null, resources); if (datanode != null) { datanode.join(); } else { errorCode = 1; } } catch (Throwable e) { LOG.error("Exception in secureMain", e); terminate(1, e); } finally { // We need to terminate the process here because either shutdown was called // or some disk related conditions like volumes tolerated or volumes required // condition was not met. Also, In secure mode, control will go to Jsvc // and Datanode process hangs if it does not exit. LOG.warn("Exiting Datanode"); terminate(errorCode); } }
public static void main(String args[]) throws Exception { StringUtils.startupShutdownMessage(DFSZKFailoverController.class, args, LOG); if (DFSUtil.parseHelpArgument(args, ZKFailoverController.USAGE, System.out, true)) { System.exit(0); } GenericOptionsParser parser = new GenericOptionsParser( new HdfsConfiguration(), args); DFSZKFailoverController zkfc = DFSZKFailoverController.create( parser.getConfiguration()); try { System.exit(zkfc.run(parser.getRemainingArgs())); } catch (Throwable t) { LOG.error("DFSZKFailOverController exiting due to earlier exception " + t); terminate(1, t); } }
StringUtils.startupShutdownMessage(SecondaryNameNode.class, argv, LOG); Configuration tconf = new HdfsConfiguration(); SecondaryNameNode secondary = null;
/** * Main method to start SPS service. */ public static void main(String[] args) throws Exception { NameNodeConnector nnc = null; try { StringUtils.startupShutdownMessage(StoragePolicySatisfier.class, args, LOG); HdfsConfiguration spsConf = new HdfsConfiguration(); // login with SPS keytab secureLogin(spsConf); StoragePolicySatisfier sps = new StoragePolicySatisfier(spsConf); nnc = getNameNodeConnector(spsConf); ExternalSPSContext context = new ExternalSPSContext(sps, nnc); sps.init(context); sps.start(StoragePolicySatisfierMode.EXTERNAL); if (sps != null) { sps.join(); } } catch (Throwable e) { LOG.error("Failed to start storage policy satisfier.", e); terminate(1, e); } finally { if (nnc != null) { nnc.close(); } } }
/** * Print a log message for starting up and shutting down * @param clazz the class of the server * @param args arguments * @param LOG the target log object */ public static void startupShutdownMessage(Class<?> clazz, String[] args, final org.apache.commons.logging.Log LOG) { startupShutdownMessage(clazz, args, LogAdapter.create(LOG)); }
/** * Print a log message for starting up and shutting down * @param clazz the class of the server * @param args arguments * @param LOG the target log object */ public static void startupShutdownMessage(Class<?> clazz, String[] args, final org.apache.commons.logging.Log LOG) { startupShutdownMessage(clazz, args, LogAdapter.create(LOG)); }
/** * Print a log message for starting up and shutting down * @param clazz the class of the server * @param args arguments * @param LOG the target log object */ public static void startupShutdownMessage(Class<?> clazz, String[] args, final org.apache.commons.logging.Log LOG) { startupShutdownMessage(clazz, args, LogAdapter.create(LOG)); }
/** * Print a log message for starting up and shutting down * @param clazz the class of the server * @param args arguments * @param LOG the target log object */ public static void startupShutdownMessage(Class<?> clazz, String[] args, final org.slf4j.Logger LOG) { startupShutdownMessage(clazz, args, LogAdapter.create(LOG)); }
/** * Print a log message for starting up and shutting down * @param clazz the class of the server * @param args arguments * @param LOG the target log object */ public static void startupShutdownMessage(Class<?> clazz, String[] args, final org.slf4j.Logger LOG) { startupShutdownMessage(clazz, args, LogAdapter.create(LOG)); }
/** * Print a log message for starting up and shutting down * @param clazz the class of the server * @param args arguments * @param LOG the target log object */ public static void startupShutdownMessage(Class<?> clazz, String[] args, final io.prestosql.hadoop.$internal.org.slf4j.Logger LOG) { startupShutdownMessage(clazz, args, LogAdapter.create(LOG)); }
public static void main(String[] args) throws Exception { StringUtils.startupShutdownMessage(JournalNode.class, args, LOG); try { System.exit(ToolRunner.run(new JournalNode(), args)); } catch (Throwable e) { LOG.error("Failed to start journalnode.", e); terminate(-1, e); } }
public static void main(String[] args) throws Exception { StringUtils.startupShutdownMessage(JournalNode.class, args, LOG); try { System.exit(ToolRunner.run(new JournalNode(), args)); } catch (Throwable e) { LOG.error("Failed to start journalnode.", e); terminate(-1, e); } }
public static void main(String[] args) throws IOException { Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler()); StringUtils.startupShutdownMessage(NodeManager.class, args, LOG); @SuppressWarnings("resource") NodeManager nodeManager = new NodeManager(); Configuration conf = new YarnConfiguration(); new GenericOptionsParser(conf, args); nodeManager.initAndStartNodeManager(conf, false); }
static Nfs3 startService(String[] args, DatagramSocket registrationSocket) throws IOException { StringUtils.startupShutdownMessage(Nfs3.class, args, LOG); NfsConfiguration conf = new NfsConfiguration(); boolean allowInsecurePorts = conf.getBoolean( NfsConfigKeys.DFS_NFS_PORT_MONITORING_DISABLED_KEY, NfsConfigKeys.DFS_NFS_PORT_MONITORING_DISABLED_DEFAULT); final Nfs3 nfsServer = new Nfs3(conf, registrationSocket, allowInsecurePorts); nfsServer.startServiceInternal(true); return nfsServer; }
public static void main(String[] args) { Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler()); StringUtils.startupShutdownMessage(WebAppProxyServer.class, args, LOG); try { YarnConfiguration configuration = new YarnConfiguration(); new GenericOptionsParser(configuration, args); WebAppProxyServer proxyServer = startServer(configuration); proxyServer.proxy.join(); } catch (Throwable t) { ExitUtil.terminate(-1, t); } }