@Override public void init(CrailStatistics statistics, CrailBufferCache bufferCache, CrailConfiguration conf, String[] args) throws IOException { TcpStorageConstants.updateConstants(conf); this.clientGroup = new NaRPCClientGroup<TcpStorageRequest, TcpStorageResponse>(TcpStorageConstants.STORAGE_TCP_QUEUE_DEPTH, (int) CrailConstants.BLOCK_SIZE*2, false); }
public NaRPCClientGroup(int queueDepth, int messageSize, boolean nodelay) { super(queueDepth, messageSize, nodelay); LOG.info("new NaRPC server group v1.0, queueDepth " + this.getQueueDepth() + ", messageSize " + this.getMessageSize() + ", nodealy " + this.isNodelay()); }
public RpcConnection connect(InetSocketAddress address) throws IOException { try { NaRPCEndpoint<TcpNameNodeRequest, TcpNameNodeResponse> endpoint = clientGroup.createEndpoint(); endpoint.connect(address); TcpRpcConnection connection = new TcpRpcConnection(endpoint); allConnections.add(connection); return connection; } catch(Exception e){ throw new IOException(e); } }
public RpcConnection connect(InetSocketAddress address) throws IOException { try { NaRPCEndpoint<TcpNameNodeRequest, TcpNameNodeResponse> endpoint = clientGroup.createEndpoint(); endpoint.connect(address); TcpRpcConnection connection = new TcpRpcConnection(endpoint); allConnections.add(connection); return connection; } catch(Exception e){ throw new IOException(e); } }
@Override public StorageEndpoint createEndpoint(DataNodeInfo info) throws IOException { try { NaRPCEndpoint<TcpStorageRequest, TcpStorageResponse> narpcEndpoint = clientGroup.createEndpoint(); TcpStorageEndpoint endpoint = new TcpStorageEndpoint(narpcEndpoint); endpoint.connect(CrailUtils.datanodeInfo2SocketAddr(info)); return endpoint; } catch(Exception e){ throw new IOException(e); } }
@Override public void init(CrailConfiguration conf, String[] args) throws Exception { TcpStorageConstants.updateConstants(conf); this.clientGroup = new NaRPCClientGroup<TcpStorageRequest, TcpStorageResponse>(TcpStorageConstants.STORAGE_TCP_QUEUE_DEPTH, (int) CrailConstants.BLOCK_SIZE*2, false); }
public NaRPCClientGroup() { super(); LOG.info("new NaRPC server group v1.0, queueDepth " + this.getQueueDepth() + ", messageSize " + this.getMessageSize() + ", nodealy " + this.isNodelay()); }
@Override public StorageEndpoint createEndpoint(DataNodeInfo info) throws IOException { try { NaRPCEndpoint<TcpStorageRequest, TcpStorageResponse> narpcEndpoint = clientGroup.createEndpoint(); TcpStorageEndpoint endpoint = new TcpStorageEndpoint(narpcEndpoint); endpoint.connect(CrailUtils.datanodeInfo2SocketAddr(info)); return endpoint; } catch(Exception e){ throw new IOException(e); } }
public void init(CrailConfiguration conf, String[] strings) throws IOException { try { TcpRpcConstants.updateConstants(conf); TcpRpcConstants.verify(); this.clientGroup = new NaRPCClientGroup<TcpNameNodeRequest, TcpNameNodeResponse>(TcpRpcConstants.NAMENODE_TCP_QUEUEDEPTH, TcpRpcConstants.NAMENODE_TCP_MESSAGESIZE, true); this.allConnections = new LinkedList<TcpRpcConnection>(); } catch(Exception e){ throw new IOException(e); } }
public void init(CrailConfiguration conf, String[] strings) throws IOException { try { TcpRpcConstants.updateConstants(conf); TcpRpcConstants.verify(); this.clientGroup = new NaRPCClientGroup<TcpNameNodeRequest, TcpNameNodeResponse>(TcpRpcConstants.NAMENODE_TCP_QUEUEDEPTH, TcpRpcConstants.NAMENODE_TCP_MESSAGESIZE, true); this.allConnections = new LinkedList<TcpRpcConnection>(); } catch(Exception e){ throw new IOException(e); } }