public RdmaPassiveEndpointGroup<RdmaEndpoint> createDefaultGroup(int timeout, int maxWR, int maxSge, int cqSize) throws IOException{ RdmaPassiveEndpointGroup<RdmaEndpoint> group = new RdmaPassiveEndpointGroup<RdmaEndpoint>(timeout, maxWR, maxSge, cqSize); group.init(new RawEndpointFactory(group)); return group; }
public ReadClient(String host, int port, int size, int loop) throws IOException{ this.group = new RdmaPassiveEndpointGroup<ReadClient.ReadClientEndpoint>(1, 10, 4, 40); this.group.init(this); this.host = host; this.port = port; this.size = size; this.loop = loop; }
public SendRecvClient(String host, int port, int size, int loop, int recvQueueSize) throws IOException{ this.group = new RdmaPassiveEndpointGroup<SendRecvClient.SendRecvEndpoint>(1, recvQueueSize, 1, recvQueueSize*2); this.group.init(this); this.host = host; this.port = port; this.size = size; this.loop = loop; this.recvQueueSize = recvQueueSize; }
public SendRecvServer(String host, int port, int size, int loop, int recvQueueSize) throws IOException{ this.group = new RdmaPassiveEndpointGroup<SendRecvServer.SendRecvEndpoint>(1, recvQueueSize, 1, recvQueueSize*2); this.group.init(this); this.host = host; this.port = port; this.size = size; this.loop = loop; this.recvQueueSize = recvQueueSize; }
public void init(CrailConfiguration conf, String[] args) throws Exception { RdmaConstants.init(conf, args); this.serverAddr = StorageUtils.getDataNodeAddress(RdmaConstants.STORAGE_RDMA_INTERFACE, RdmaConstants.STORAGE_RDMA_PORT); if (serverAddr == null){ LOG.info("Configured network interface " + RdmaConstants.STORAGE_RDMA_INTERFACE + " cannot be found..exiting!!!"); return; } this.datanodeGroup = new RdmaPassiveEndpointGroup<RdmaStorageServerEndpoint>(-1, RdmaConstants.STORAGE_RDMA_QUEUESIZE, 4, RdmaConstants.STORAGE_RDMA_QUEUESIZE*100); this.datanodeServerEndpoint = datanodeGroup.createServerEndpoint(); datanodeGroup.init(new RdmaStorageEndpointFactory(datanodeGroup, this)); datanodeServerEndpoint.bind(serverAddr, RdmaConstants.STORAGE_RDMA_BACKLOG); this.allocatedSize = 0; this.fileCount = 0; this.dataDirPath = StorageUtils.getDatanodeDirectory(RdmaConstants.STORAGE_RDMA_DATA_PATH, serverAddr); if (!RdmaConstants.STORAGE_RDMA_PERSISTENT){ StorageUtils.clean(RdmaConstants.STORAGE_RDMA_DATA_PATH, dataDirPath); } }