public synchronized NettyClientBase getTajoMasterConnection() { if (client != null && client.isConnected()) { return client; } else { try { RpcClientManager.cleanup(client); // Client do not closed on idle state for support high available this.client = manager.newBlockingClient(getTajoMasterAddr(), TajoMasterClientProtocol.class, eventLoopGroup, clientParams); } catch (Throwable t) { throw new TajoRuntimeException(new ClientConnectionException(t)); } return client; } }
public synchronized NettyClientBase getTajoMasterConnection() { if (client != null && client.isConnected()) { return client; } else { try { RpcClientManager.cleanup(client); // Client do not closed on idle state for support high available this.client = manager.newBlockingClient(getTajoMasterAddr(), TajoMasterClientProtocol.class, eventLoopGroup, clientParams); } catch (Throwable t) { throw new TajoRuntimeException(new ClientConnectionException(t)); } return client; } }