break; case RpcProtocol.REQ_GET_DATANODE: getDataNodeReq.update(buffer); break; case RpcProtocol.REQ_DUMP_NAMENODE:
break; case RpcProtocol.REQ_GET_DATANODE: written += getDataNodeReq.write(buffer); break; case RpcProtocol.REQ_DUMP_NAMENODE:
break; case RpcProtocol.REQ_GET_DATANODE: written += getDataNodeReq.write(buffer); break; case RpcProtocol.REQ_DUMP_NAMENODE:
break; case RpcProtocol.REQ_GET_DATANODE: getDataNodeReq.update(buffer); break; case RpcProtocol.REQ_DUMP_NAMENODE:
break; case RpcProtocol.REQ_GET_DATANODE: written += getDataNodeReq.write(buffer); break; case RpcProtocol.REQ_DUMP_NAMENODE:
break; case RpcProtocol.REQ_GET_DATANODE: getDataNodeReq.update(buffer); break; case RpcProtocol.REQ_DUMP_NAMENODE:
@Override public short getDataNode(RpcRequestMessage.GetDataNodeReq request, RpcResponseMessage.GetDataNodeRes response, RpcNameNodeState errorState) throws Exception { //check protocol if (!RpcProtocol.verifyProtocol(RpcProtocol.CMD_GET_DATANODE, request, response)){ return RpcErrors.ERR_PROTOCOL_MISMATCH; } //get params DataNodeInfo dnInfo = request.getInfo(); //rpc DataNodeBlocks dnInfoNn = blockStore.getDataNode(dnInfo); if (dnInfoNn == null){ return RpcErrors.ERR_DATANODE_NOT_REGISTERED; } dnInfoNn.touch(); response.setServiceId(serviceId); response.setFreeBlockCount(dnInfoNn.getBlockCount()); return RpcErrors.ERR_OK; }
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.GetDataNodeReq message) { this.type = message.getType(); this.getDataNodeReq = message; }
public TcpNameNodeRequest(RpcRequestMessage.GetDataNodeReq message) { this.type = message.getType(); this.getDataNodeReq = message; }
public LogRecord(RpcRequestMessage.GetDataNodeReq message) { this.type = message.getType(); this.getDataNodeReq = message; }
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; }