break; case RpcProtocol.REQ_PING_NAMENODE: pingNameNodeReq.update(buffer); break;
break; case RpcProtocol.REQ_PING_NAMENODE: written += pingNameNodeReq.write(buffer); break;
break; case RpcProtocol.REQ_PING_NAMENODE: written += pingNameNodeReq.write(buffer); break;
break; case RpcProtocol.REQ_PING_NAMENODE: pingNameNodeReq.update(buffer); break;
break; case RpcProtocol.REQ_PING_NAMENODE: written += pingNameNodeReq.write(buffer); break;
break; case RpcProtocol.REQ_PING_NAMENODE: pingNameNodeReq.update(buffer); break;
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 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 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 DaRPCNameNodeRequest(RpcRequestMessage.PingNameNodeReq message) { this.type = message.getType(); this.pingNameNodeReq = message; }
public TcpNameNodeRequest(RpcRequestMessage.PingNameNodeReq message) { this.type = message.getType(); this.pingNameNodeReq = message; }
public LogRecord(RpcRequestMessage.PingNameNodeReq message) { this.type = message.getType(); this.pingNameNodeReq = message; }
public RpcFuture<RpcPing> pingNameNode() throws Exception { RpcRequestMessage.PingNameNodeReq req = new RpcRequestMessage.PingNameNodeReq(); RpcResponseMessage.PingNameNodeRes resp = new RpcResponseMessage.PingNameNodeRes(); TcpNameNodeRequest request = new TcpNameNodeRequest(req); TcpNameNodeResponse response = new TcpNameNodeResponse(resp); request.setCommand(RpcProtocol.CMD_PING_NAMENODE); NaRPCFuture<TcpNameNodeRequest, TcpNameNodeResponse> future = endpoint.issueRequest(request, response); return new TcpFuture<RpcPing>(future, resp); }
@Override public short ping(RpcRequestMessage.PingNameNodeReq request, RpcResponseMessage.PingNameNodeRes response, RpcNameNodeState errorState) throws Exception { if (!RpcProtocol.verifyProtocol(RpcProtocol.CMD_PING_NAMENODE, request, response)){ return RpcErrors.ERR_PROTOCOL_MISMATCH; } response.setData(request.getOp()+1); return RpcErrors.ERR_OK; }
@Override public DaRPCNameNodeFuture<RpcPing> pingNameNode() throws Exception { RpcRequestMessage.PingNameNodeReq pingReq = new RpcRequestMessage.PingNameNodeReq(); DaRPCNameNodeRequest request = new DaRPCNameNodeRequest(pingReq); request.setCommand(RpcProtocol.CMD_PING_NAMENODE); RpcResponseMessage.PingNameNodeRes pingRes = new RpcResponseMessage.PingNameNodeRes(); DaRPCNameNodeResponse response = new DaRPCNameNodeResponse(pingRes); DaRPCFuture<DaRPCNameNodeRequest, DaRPCNameNodeResponse> future = issueRPC(request, response); DaRPCNameNodeFuture<RpcPing> nameNodeFuture = new DaRPCNameNodeFuture<RpcPing>(future, pingRes); return nameNodeFuture; }