Ejemplo n.º 1
0
 public virtual object GetDatum()
 {
     if (datum == null)
     {
         datum            = new TaskAttemptUnsuccessfulCompletion();
         datum.taskid     = new Utf8(attemptId.GetTaskID().ToString());
         datum.taskType   = new Utf8(taskType.ToString());
         datum.attemptId  = new Utf8(attemptId.ToString());
         datum.finishTime = finishTime;
         datum.hostname   = new Utf8(hostname);
         if (rackName != null)
         {
             datum.rackname = new Utf8(rackName);
         }
         datum.port        = port;
         datum.error       = new Utf8(error);
         datum.status      = new Utf8(status);
         datum.counters    = EventWriter.ToAvro(counters);
         datum.clockSplits = AvroArrayUtils.ToAvro(ProgressSplitsBlock.ArrayGetWallclockTime
                                                       (allSplits));
         datum.cpuUsages = AvroArrayUtils.ToAvro(ProgressSplitsBlock.ArrayGetCPUTime(allSplits
                                                                                     ));
         datum.vMemKbytes = AvroArrayUtils.ToAvro(ProgressSplitsBlock.ArrayGetVMemKbytes(allSplits
                                                                                         ));
         datum.physMemKbytes = AvroArrayUtils.ToAvro(ProgressSplitsBlock.ArrayGetPhysMemKbytes
                                                         (allSplits));
     }
     return(datum);
 }
Ejemplo n.º 2
0
 /// <summary>Create an event to record the unsuccessful completion of attempts</summary>
 /// <param name="id">Attempt ID</param>
 /// <param name="taskType">Type of the task</param>
 /// <param name="status">Status of the attempt</param>
 /// <param name="finishTime">Finish time of the attempt</param>
 /// <param name="hostname">Name of the host where the attempt executed</param>
 /// <param name="port">rpc port for for the tracker</param>
 /// <param name="rackName">Name of the rack where the attempt executed</param>
 /// <param name="error">Error string</param>
 /// <param name="counters">Counters for the attempt</param>
 /// <param name="allSplits">
 /// the "splits", or a pixelated graph of various
 /// measurable worker node state variables against progress.
 /// Currently there are four; wallclock time, CPU time,
 /// virtual memory and physical memory.
 /// </param>
 public TaskAttemptUnsuccessfulCompletionEvent(TaskAttemptID id, TaskType taskType
                                               , string status, long finishTime, string hostname, int port, string rackName, string
                                               error, Counters counters, int[][] allSplits)
 {
     this.attemptId     = id;
     this.taskType      = taskType;
     this.status        = status;
     this.finishTime    = finishTime;
     this.hostname      = hostname;
     this.port          = port;
     this.rackName      = rackName;
     this.error         = error;
     this.counters      = counters;
     this.allSplits     = allSplits;
     this.clockSplits   = ProgressSplitsBlock.ArrayGetWallclockTime(allSplits);
     this.cpuUsages     = ProgressSplitsBlock.ArrayGetCPUTime(allSplits);
     this.vMemKbytes    = ProgressSplitsBlock.ArrayGetVMemKbytes(allSplits);
     this.physMemKbytes = ProgressSplitsBlock.ArrayGetPhysMemKbytes(allSplits);
 }
Ejemplo n.º 3
0
 /// <summary>Create an event for successful completion of map attempts</summary>
 /// <param name="id">Task Attempt ID</param>
 /// <param name="taskType">Type of the task</param>
 /// <param name="taskStatus">Status of the task</param>
 /// <param name="mapFinishTime">Finish time of the map phase</param>
 /// <param name="finishTime">Finish time of the attempt</param>
 /// <param name="hostname">Name of the host where the map executed</param>
 /// <param name="port">RPC port for the tracker host.</param>
 /// <param name="rackName">Name of the rack where the map executed</param>
 /// <param name="state">State string for the attempt</param>
 /// <param name="counters">Counters for the attempt</param>
 /// <param name="allSplits">
 /// the "splits", or a pixelated graph of various
 /// measurable worker node state variables against progress.
 /// Currently there are four; wallclock time, CPU time,
 /// virtual memory and physical memory.
 /// If you have no splits data, code
 /// <see langword="null"/>
 /// for this
 /// parameter.
 /// </param>
 public MapAttemptFinishedEvent(TaskAttemptID id, TaskType taskType, string taskStatus
                                , long mapFinishTime, long finishTime, string hostname, int port, string rackName
                                , string state, Counters counters, int[][] allSplits)
 {
     this.attemptId     = id;
     this.taskType      = taskType;
     this.taskStatus    = taskStatus;
     this.mapFinishTime = mapFinishTime;
     this.finishTime    = finishTime;
     this.hostname      = hostname;
     this.rackName      = rackName;
     this.port          = port;
     this.state         = state;
     this.counters      = counters;
     this.allSplits     = allSplits;
     this.clockSplits   = ProgressSplitsBlock.ArrayGetWallclockTime(allSplits);
     this.cpuUsages     = ProgressSplitsBlock.ArrayGetCPUTime(allSplits);
     this.vMemKbytes    = ProgressSplitsBlock.ArrayGetVMemKbytes(allSplits);
     this.physMemKbytes = ProgressSplitsBlock.ArrayGetPhysMemKbytes(allSplits);
 }