internal void FireMapReduceCallback(string taskId, int taskstatus, string taskFailureReason, short callbackId) { TaskCompletionStatus status = TaskCompletionStatus.Success; switch (taskstatus) { case 0: status = TaskCompletionStatus.Success; break; case 1: status = TaskCompletionStatus.Failure; break; case 2: status = TaskCompletionStatus.Cancelled; break; } TaskResult resp = new TaskResult(status, taskId, callbackId, taskFailureReason); if (_mapReduceListenerIDPool != null) { ResourcePool poole = _mapReduceListenerIDPool; TaskListener callback = (TaskListener)poole.GetResource(callbackId); if (callback != null) { callback.Invoke(resp); } } }