Apache.Hadoop.Hive.Task.Write C# (CSharp) Method

Write() public method

public Write ( TProtocol oprot ) : void
oprot Thrift.Protocol.TProtocol
return void
        public void Write(TProtocol oprot)
        {
            TStruct struc = new TStruct("Task");
              oprot.WriteStructBegin(struc);
              TField field = new TField();
              if (TaskId != null && __isset.taskId) {
            field.Name = "taskId";
            field.Type = TType.String;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            oprot.WriteString(TaskId);
            oprot.WriteFieldEnd();
              }
              if (__isset.taskType) {
            field.Name = "taskType";
            field.Type = TType.I32;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            oprot.WriteI32((int)TaskType);
            oprot.WriteFieldEnd();
              }
              if (TaskAttributes != null && __isset.taskAttributes) {
            field.Name = "taskAttributes";
            field.Type = TType.Map;
            field.ID = 3;
            oprot.WriteFieldBegin(field);
            {
              oprot.WriteMapBegin(new TMap(TType.String, TType.String, TaskAttributes.Count));
              foreach (string _iter33 in TaskAttributes.Keys)
              {
            oprot.WriteString(_iter33);
            oprot.WriteString(TaskAttributes[_iter33]);
              }
              oprot.WriteMapEnd();
            }
            oprot.WriteFieldEnd();
              }
              if (TaskCounters != null && __isset.taskCounters) {
            field.Name = "taskCounters";
            field.Type = TType.Map;
            field.ID = 4;
            oprot.WriteFieldBegin(field);
            {
              oprot.WriteMapBegin(new TMap(TType.String, TType.I64, TaskCounters.Count));
              foreach (string _iter34 in TaskCounters.Keys)
              {
            oprot.WriteString(_iter34);
            oprot.WriteI64(TaskCounters[_iter34]);
              }
              oprot.WriteMapEnd();
            }
            oprot.WriteFieldEnd();
              }
              if (OperatorGraph != null && __isset.operatorGraph) {
            field.Name = "operatorGraph";
            field.Type = TType.Struct;
            field.ID = 5;
            oprot.WriteFieldBegin(field);
            OperatorGraph.Write(oprot);
            oprot.WriteFieldEnd();
              }
              if (OperatorList != null && __isset.operatorList) {
            field.Name = "operatorList";
            field.Type = TType.List;
            field.ID = 6;
            oprot.WriteFieldBegin(field);
            {
              oprot.WriteListBegin(new TList(TType.Struct, OperatorList.Count));
              foreach (Operator _iter35 in OperatorList)
              {
            _iter35.Write(oprot);
              }
              oprot.WriteListEnd();
            }
            oprot.WriteFieldEnd();
              }
              if (__isset.done) {
            field.Name = "done";
            field.Type = TType.Bool;
            field.ID = 7;
            oprot.WriteFieldBegin(field);
            oprot.WriteBool(Done);
            oprot.WriteFieldEnd();
              }
              if (__isset.started) {
            field.Name = "started";
            field.Type = TType.Bool;
            field.ID = 8;
            oprot.WriteFieldBegin(field);
            oprot.WriteBool(Started);
            oprot.WriteFieldEnd();
              }
              oprot.WriteFieldStop();
              oprot.WriteStructEnd();
        }