@Override public DaRPCNameNodeFuture<RpcGetLocation> getLocation(FileName fileName, long position) throws IOException { if (CrailConstants.DEBUG){ LOG.debug("RPC: getLocation, position " + position); } RpcRequestMessage.GetLocationReq getLocationReq = new RpcRequestMessage.GetLocationReq(fileName, position); DaRPCNameNodeRequest request = new DaRPCNameNodeRequest(getLocationReq); request.setCommand(RpcProtocol.CMD_GET_LOCATION); RpcResponseMessage.GetLocationRes getLocationRes = new RpcResponseMessage.GetLocationRes(); DaRPCNameNodeResponse response = new DaRPCNameNodeResponse(getLocationRes); DaRPCFuture<DaRPCNameNodeRequest, DaRPCNameNodeResponse> future = issueRPC(request, response); DaRPCNameNodeFuture<RpcGetLocation> nameNodeFuture = new DaRPCNameNodeFuture<RpcGetLocation>(future, getLocationRes); return nameNodeFuture; }
break; case RpcProtocol.REQ_GET_LOCATION: getLocationReq.update(buffer); break; case RpcProtocol.REQ_SET_BLOCK:
break; case RpcProtocol.REQ_GET_LOCATION: written += getLocationReq.write(buffer); break; case RpcProtocol.REQ_SET_BLOCK:
break; case RpcProtocol.REQ_GET_LOCATION: written += getLocationReq.write(buffer); break; case RpcProtocol.REQ_SET_BLOCK:
break; case RpcProtocol.REQ_GET_LOCATION: getLocationReq.update(buffer); break; case RpcProtocol.REQ_SET_BLOCK:
break; case RpcProtocol.REQ_GET_LOCATION: written += getLocationReq.write(buffer); break; case RpcProtocol.REQ_SET_BLOCK:
break; case RpcProtocol.REQ_GET_LOCATION: getLocationReq.update(buffer); break; case RpcProtocol.REQ_SET_BLOCK:
FileName fileName = request.getFileName(); long position = request.getPosition();
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 DaRPCNameNodeRequest(RpcRequestMessage.GetLocationReq message) { this.type = message.getType(); this.getLocationReq = message; }
public TcpNameNodeRequest(RpcRequestMessage.GetLocationReq message) { this.type = message.getType(); this.getLocationReq = message; }
public LogRecord(RpcRequestMessage.GetLocationReq message) { this.type = message.getType(); this.getLocationReq = message; }
public RpcFuture<RpcGetLocation> getLocation(FileName fileName, long l) throws IOException { RpcRequestMessage.GetLocationReq req = new RpcRequestMessage.GetLocationReq(fileName, l); RpcResponseMessage.GetLocationRes resp = new RpcResponseMessage.GetLocationRes(); TcpNameNodeRequest request = new TcpNameNodeRequest(req); TcpNameNodeResponse response = new TcpNameNodeResponse(resp); request.setCommand(RpcProtocol.CMD_GET_LOCATION); NaRPCFuture<TcpNameNodeRequest, TcpNameNodeResponse> future = endpoint.issueRequest(request, response); return new TcpFuture<RpcGetLocation>(future, resp); }