public void interrupt() { // The thread-safeness of this is dubious, but Java documentation suggests // that it is safe to do this from a different thread context close(); }
public TServerSocket(ServerSocketTransportArgs args) throws TTransportException { clientTimeout_ = args.clientTimeout; if (args.serverSocket != null) { this.serverSocket_ = args.serverSocket; return; } try { // Make server socket serverSocket_ = new ServerSocket(); // Prevent 2MSL delay problem on server restarts serverSocket_.setReuseAddress(true); // Bind to listening port serverSocket_.bind(args.bindAddr, args.backlog); } catch (IOException ioe) { close(); throw new TTransportException("Could not create ServerSocket on address " + args.bindAddr.toString() + ".", ioe); } }
fqdn = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException e) { transport.close(); throw new TTransportException(e); + " the Accumulo hosts files (e.g. masters, tservers) are the FQDN for" + " each host when using SASL.", fqdn, hostname); transport.close(); throw new RuntimeException("SASL requires that the address the thrift" + " server listens on is the same as the FQDN for this host"); serverUser = UserGroupInformation.getLoginUser(); } catch (IOException e) { transport.close(); throw new TTransportException(e);
public void interrupt() { // The thread-safeness of this is dubious, but Java documentation suggests // that it is safe to do this from a different thread context close(); }
public void interrupt() { // The thread-safeness of this is dubious, but Java documentation suggests // that it is safe to do this from a different thread context close(); }
public void interrupt() { // The thread-safeness of this is dubious, but Java documentation suggests // that it is safe to do this from a different thread context close(); }
@Override public void close() { super.close(); try { closeClientSockets(); } catch (IOException e) { LOG.error("Could not close client sockets", e); } shutdownExecutor(); }
/** * Stops the Tachyon master server. Should only be called by tests. */ public void stop() throws Exception { if (mIsServing) { LOG.info("Stopping Tachyon Master @ " + mMasterAddress); stopServing(); stopMasters(); mTServerSocket.close(); mIsServing = false; } }
@Override protected void doStop() throws Exception { if (server != null) { LOG.debug("Terminating Thrift server"); server.stop(); if (ObjectHelper.isNotEmpty(asyncServerTransport)) { asyncServerTransport.close(); asyncServerTransport = null; } if (ObjectHelper.isNotEmpty(syncServerTransport)) { syncServerTransport.close(); syncServerTransport = null; } server.stop(); server = null; } super.doStop(); }
/** * Stops serving, trying stop RPC server and web ui server and letting {@link MetricsSystem} stop * all the sinks. */ protected void stopServing() throws Exception { if (mThriftServer != null) { mThriftServer.stop(); mThriftServer = null; } if (mRpcServerSocket != null) { mRpcServerSocket.close(); mRpcServerSocket = null; } if (mJvmPauseMonitor != null) { mJvmPauseMonitor.stop(); } if (mWebServer != null) { mWebServer.stop(); mWebServer = null; } MetricsSystem.stopSinks(); }
fqdn = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException e) { transport.close(); throw new TTransportException(e); + " the Accumulo hosts files (e.g. masters, slaves) are the FQDN for each" + " host when using SASL.", fqdn, hostname); transport.close(); throw new RuntimeException("SASL requires that the address the thrift" + " server listens on is the same as the FQDN for this host"); serverUser = UserGroupInformation.getLoginUser(); } catch (IOException e) { transport.close(); throw new TTransportException(e);