public override void ExecuteCommand(ClientManager clientManager, Common.Protobuf.Command command) { long requestId; string taskId; Common.Protobuf.TaskProgressCommand taskProgressCommand = command.TaskProgressCommand; taskId = taskProgressCommand.taskId; requestId = command.requestID; try { ICommandExecuter tmpVar = clientManager.CmdExecuter; NCache nCache = (NCache)((tmpVar is NCache) ? tmpVar : null); Runtime.MapReduce.TaskStatus taskStatus = nCache.Cache.TaskStatus(taskId); Common.Protobuf.Response reponse = new Common.Protobuf.Response(); reponse.requestId = requestId; reponse.TaskProgressResponse = new Common.Protobuf.TaskProgressResponse(); reponse.TaskProgressResponse.progresses = Serialization.Formatters.CompactBinaryFormatter.ToByteBuffer(taskStatus, nCache.Cache.Name); reponse.responseType = Common.Protobuf.Response.Type.TASK_PROGRESS; reponse.commandID = command.commandID; _serializedResponsePackets.Add(ResponseHelper.SerializeResponse(reponse)); } catch (Exception ex) { _serializedResponsePackets.Add(ResponseHelper.SerializeExceptionResponse(ex, command.requestID, command.commandID)); } }
protected override void CreateCommand() { try { base._command = new Common.Protobuf.Command(); Common.Protobuf.TaskProgressCommand taskProgressCommand = new Common.Protobuf.TaskProgressCommand(); taskProgressCommand.taskId = this._taskId; base._command.requestID = this.RequestId; base._command.TaskProgressCommand = taskProgressCommand; base._command.type = Common.Protobuf.Command.Type.TASK_PROGRESS; } catch (Exception ex) { } }