Esempio 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);
 }
Esempio n. 2
0
 public virtual void SetDatum(object odatum)
 {
     this.datum         = (TaskAttemptUnsuccessfulCompletion)odatum;
     this.attemptId     = TaskAttemptID.ForName(datum.attemptId.ToString());
     this.taskType      = TaskType.ValueOf(datum.taskType.ToString());
     this.finishTime    = datum.finishTime;
     this.hostname      = datum.hostname.ToString();
     this.rackName      = datum.rackname.ToString();
     this.port          = datum.port;
     this.status        = datum.status.ToString();
     this.error         = datum.error.ToString();
     this.counters      = EventReader.FromAvro(datum.counters);
     this.clockSplits   = AvroArrayUtils.FromAvro(datum.clockSplits);
     this.cpuUsages     = AvroArrayUtils.FromAvro(datum.cpuUsages);
     this.vMemKbytes    = AvroArrayUtils.FromAvro(datum.vMemKbytes);
     this.physMemKbytes = AvroArrayUtils.FromAvro(datum.physMemKbytes);
 }
 public virtual void SetDatum(object oDatum)
 {
     this.datum         = (MapAttemptFinished)oDatum;
     this.attemptId     = TaskAttemptID.ForName(datum.attemptId.ToString());
     this.taskType      = TaskType.ValueOf(datum.taskType.ToString());
     this.taskStatus    = datum.taskStatus.ToString();
     this.mapFinishTime = datum.mapFinishTime;
     this.finishTime    = datum.finishTime;
     this.hostname      = datum.hostname.ToString();
     this.rackName      = datum.rackname.ToString();
     this.port          = datum.port;
     this.state         = datum.state.ToString();
     this.counters      = EventReader.FromAvro(datum.counters);
     this.clockSplits   = AvroArrayUtils.FromAvro(datum.clockSplits);
     this.cpuUsages     = AvroArrayUtils.FromAvro(datum.cpuUsages);
     this.vMemKbytes    = AvroArrayUtils.FromAvro(datum.vMemKbytes);
     this.physMemKbytes = AvroArrayUtils.FromAvro(datum.physMemKbytes);
 }