Apache.Hadoop.Hbase.Thrift.BatchMutation.Read C# (CSharp) 메소드

Read() 공개 메소드

public Read ( TProtocol iprot ) : void
iprot Thrift.Protocol.TProtocol
리턴 void
        public void Read(TProtocol iprot)
        {
            TField field;
              TStruct struc = iprot.ReadStructBegin();
              while (true)
              {
            field = iprot.ReadFieldBegin();
            if (field.Type == TType.Stop) {
              break;
            }
            switch (field.ID)
            {
              case 1:
            if (field.Type == TType.String) {
              this.row = iprot.ReadBinary();
              this.__isset.row = true;
            } else {
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
              case 2:
            if (field.Type == TType.List) {
              {
                this.mutations = new List<Mutation>();
                TList _list0 = iprot.ReadListBegin();
                for( int _i1 = 0; _i1 < _list0.Count; ++_i1)
                {
                  Mutation _elem2 = new Mutation();
                  _elem2 = new Mutation();
                  _elem2.Read(iprot);
                  this.mutations.Add(_elem2);
                }
                iprot.ReadListEnd();
              }
              this.__isset.mutations = true;
            } else {
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
              default:
            TProtocolUtil.Skip(iprot, field.Type);
            break;
            }
            iprot.ReadFieldEnd();
              }
              iprot.ReadStructEnd();
        }

Usage Example

예제 #1
0
파일: Hbase.cs 프로젝트: charliem/OCM
 public void Read(TProtocol iprot)
 {
     TField field;
     TStruct struc = iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 1:
       if (field.Type == TType.String) {
     this.tableName = iprot.ReadBinary();
     this.__isset.tableName = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.List) {
     {
       this.rowBatches = new List<BatchMutation>();
       TList _list42 = iprot.ReadListBegin();
       for( int _i43 = 0; _i43 < _list42.Count; ++_i43)
       {
         BatchMutation _elem44 = new BatchMutation();
         _elem44 = new BatchMutation();
         _elem44.Read(iprot);
         this.rowBatches.Add(_elem44);
       }
       iprot.ReadListEnd();
     }
     this.__isset.rowBatches = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }