public TcpNameNodeRequest() { this.cmd = 0; this.type = 0; this.createFileReq = new RpcRequestMessage.CreateFileReq(); this.fileReq = new RpcRequestMessage.GetFileReq(); this.setFileReq = new RpcRequestMessage.SetFileReq(); this.removeReq = new RpcRequestMessage.RemoveFileReq(); this.renameFileReq = new RpcRequestMessage.RenameFileReq(); this.getBlockReq = new RpcRequestMessage.GetBlockReq(); this.getLocationReq = new RpcRequestMessage.GetLocationReq(); this.setBlockReq = new RpcRequestMessage.SetBlockReq(); this.dumpNameNodeReq = new RpcRequestMessage.DumpNameNodeReq(); this.pingNameNodeReq = new RpcRequestMessage.PingNameNodeReq(); this.getDataNodeReq = new RpcRequestMessage.GetDataNodeReq(); }
public DaRPCNameNodeRequest() { this.cmd = 0; this.type = 0; this.createFileReq = new RpcRequestMessage.CreateFileReq(); this.fileReq = new RpcRequestMessage.GetFileReq(); this.setFileReq = new RpcRequestMessage.SetFileReq(); this.removeReq = new RpcRequestMessage.RemoveFileReq(); this.renameFileReq = new RpcRequestMessage.RenameFileReq(); this.getBlockReq = new RpcRequestMessage.GetBlockReq(); this.getLocationReq = new RpcRequestMessage.GetLocationReq(); this.setBlockReq = new RpcRequestMessage.SetBlockReq(); this.dumpNameNodeReq = new RpcRequestMessage.DumpNameNodeReq(); this.pingNameNodeReq = new RpcRequestMessage.PingNameNodeReq(); this.getDataNodeReq = new RpcRequestMessage.GetDataNodeReq(); }
public LogRecord() { this.cmd = 0; this.type = 0; this.createFileReq = new RpcRequestMessage.CreateFileReq(); this.fileReq = new RpcRequestMessage.GetFileReq(); this.setFileReq = new RpcRequestMessage.SetFileReq(); this.removeReq = new RpcRequestMessage.RemoveFileReq(); this.renameFileReq = new RpcRequestMessage.RenameFileReq(); this.getBlockReq = new RpcRequestMessage.GetBlockReq(); this.getLocationReq = new RpcRequestMessage.GetLocationReq(); this.setBlockReq = new RpcRequestMessage.SetBlockReq(); this.dumpNameNodeReq = new RpcRequestMessage.DumpNameNodeReq(); this.pingNameNodeReq = new RpcRequestMessage.PingNameNodeReq(); this.getDataNodeReq = new RpcRequestMessage.GetDataNodeReq(); }
public RpcFuture<RpcGetDataNode> getDataNode(DataNodeInfo dataNodeInfo) throws Exception { RpcRequestMessage.GetDataNodeReq req = new RpcRequestMessage.GetDataNodeReq(dataNodeInfo); RpcResponseMessage.GetDataNodeRes resp = new RpcResponseMessage.GetDataNodeRes(); TcpNameNodeRequest request = new TcpNameNodeRequest(req); TcpNameNodeResponse response = new TcpNameNodeResponse(resp); request.setCommand(RpcProtocol.CMD_GET_DATANODE); NaRPCFuture<TcpNameNodeRequest, TcpNameNodeResponse> future = endpoint.issueRequest(request, response); return new TcpFuture<RpcGetDataNode>(future, resp); }
@Override public DaRPCNameNodeFuture<RpcGetDataNode> getDataNode(DataNodeInfo dnInfo) throws Exception { RpcRequestMessage.GetDataNodeReq getDataNodeReq = new RpcRequestMessage.GetDataNodeReq(dnInfo); DaRPCNameNodeRequest request = new DaRPCNameNodeRequest(getDataNodeReq); request.setCommand(RpcProtocol.CMD_GET_DATANODE); RpcResponseMessage.GetDataNodeRes getDataNodeRes = new RpcResponseMessage.GetDataNodeRes(); DaRPCNameNodeResponse response = new DaRPCNameNodeResponse(getDataNodeRes); DaRPCFuture<DaRPCNameNodeRequest, DaRPCNameNodeResponse> future = issueRPC(request, response); DaRPCNameNodeFuture<RpcGetDataNode> nameNodeFuture = new DaRPCNameNodeFuture<RpcGetDataNode>(future, getDataNodeRes); return nameNodeFuture; }