DefaultMetricsSystem.instance()); InetSocketAddress socAddr = JournalNodeRpcServer.getAddress(conf); SecurityUtil.login(conf, DFSConfigKeys.DFS_JOURNALNODE_KEYTAB_FILE_KEY, DFSConfigKeys.DFS_JOURNALNODE_KERBEROS_PRINCIPAL_KEY, rpcServer = new JournalNodeRpcServer(conf, this); rpcServer.start(); } catch (IOException ioe) {
/** * Wait for the daemon to exit. * @return the result code (non-zero if error) */ int join() throws InterruptedException { if (rpcServer != null) { rpcServer.join(); } return resultCode; }
/** * @return the address the IPC server is bound to */ public InetSocketAddress getBoundIpcAddress() { return rpcServer.getAddress(); }
rpcServer.stop();
true); InetSocketAddress addr = getAddress(confCopy); String bindHost = conf.getTrimmed(DFS_JOURNALNODE_RPC_BIND_HOST_KEY, null); if (bindHost == null) {
/** * Stop the daemon with the given status code * @param rc the status code with which to exit (non-zero * should indicate an error) */ public void stop(int rc) { this.resultCode = rc; if (rpcServer != null) { rpcServer.stop(); } if (httpServer != null) { try { httpServer.stop(); } catch (IOException ioe) { LOG.warn("Unable to stop HTTP server for " + this, ioe); } } for (Journal j : journalsById.values()) { IOUtils.cleanup(LOG, j); } if (journalNodeInfoBeanName != null) { MBeans.unregister(journalNodeInfoBeanName); journalNodeInfoBeanName = null; } }
/** * Start listening for edits via RPC. */ public void start() throws IOException { Preconditions.checkState(!isStarted(), "JN already running"); validateAndCreateJournalDir(localDir); DefaultMetricsSystem.initialize("JournalNode"); JvmMetrics.create("JournalNode", conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY), DefaultMetricsSystem.instance()); InetSocketAddress socAddr = JournalNodeRpcServer.getAddress(conf); SecurityUtil.login(conf, DFSConfigKeys.DFS_JOURNALNODE_KEYTAB_FILE_KEY, DFSConfigKeys.DFS_JOURNALNODE_KERBEROS_PRINCIPAL_KEY, socAddr.getHostName()); registerJNMXBean(); httpServer = new JournalNodeHttpServer(conf, this); httpServer.start(); httpServerURI = httpServer.getServerURI().toString(); rpcServer = new JournalNodeRpcServer(conf, this); rpcServer.start(); }
/** * @return the address the IPC server is bound to */ public InetSocketAddress getBoundIpcAddress() { return rpcServer.getAddress(); }
/** * Wait for the daemon to exit. * @return the result code (non-zero if error) */ int join() throws InterruptedException { if (rpcServer != null) { rpcServer.join(); } return resultCode; }
/** * Stop the daemon with the given status code * @param rc the status code with which to exit (non-zero * should indicate an error) */ public void stop(int rc) { this.resultCode = rc; if (rpcServer != null) { rpcServer.stop(); } if (httpServer != null) { try { httpServer.stop(); } catch (IOException ioe) { LOG.warn("Unable to stop HTTP server for " + this, ioe); } } for (Journal j : journalsById.values()) { IOUtils.cleanup(LOG, j); } if (journalNodeInfoBeanName != null) { MBeans.unregister(journalNodeInfoBeanName); journalNodeInfoBeanName = null; } }
/** * Start listening for edits via RPC. */ public void start() throws IOException { Preconditions.checkState(!isStarted(), "JN already running"); validateAndCreateJournalDir(localDir); DefaultMetricsSystem.initialize("JournalNode"); JvmMetrics.create("JournalNode", conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY), DefaultMetricsSystem.instance()); InetSocketAddress socAddr = JournalNodeRpcServer.getAddress(conf); SecurityUtil.login(conf, DFSConfigKeys.DFS_JOURNALNODE_KEYTAB_FILE_KEY, DFSConfigKeys.DFS_JOURNALNODE_KERBEROS_PRINCIPAL_KEY, socAddr.getHostName()); registerJNMXBean(); httpServer = new JournalNodeHttpServer(conf, this); httpServer.start(); httpServerURI = httpServer.getServerURI().toString(); rpcServer = new JournalNodeRpcServer(conf, this); rpcServer.start(); }
/** * @return the address the IPC server is bound to */ public InetSocketAddress getBoundIpcAddress() { return rpcServer.getAddress(); }
/** * Wait for the daemon to exit. * @return the result code (non-zero if error) */ int join() throws InterruptedException { if (rpcServer != null) { rpcServer.join(); } return resultCode; }
true); InetSocketAddress addr = getAddress(confCopy); RPC.setProtocolEngine(confCopy, QJournalProtocolPB.class, ProtobufRpcEngine.class);
true); InetSocketAddress addr = getAddress(confCopy); RPC.setProtocolEngine(confCopy, QJournalProtocolPB.class, ProtobufRpcEngine.class);