Apache.Hadoop.Hbase.Thrift.TCell.Read C# (CSharp) Method

Read() public method

public Read ( TProtocol iprot ) : void
iprot Thrift.Protocol.TProtocol
return 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.value = iprot.ReadBinary();
              this.__isset.value = true;
            } else {
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
              case 2:
            if (field.Type == TType.I64) {
              this.timestamp = iprot.ReadI64();
              this.__isset.timestamp = true;
            } else {
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
              default:
            TProtocolUtil.Skip(iprot, field.Type);
            break;
            }
            iprot.ReadFieldEnd();
              }
              iprot.ReadStructEnd();
        }

Usage Example

Ejemplo n.º 1
0
 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.Map) {
       {
         this.columns = new Dictionary<byte[], TCell>();
         TMap _map4 = iprot.ReadMapBegin();
         for( int _i5 = 0; _i5 < _map4.Count; ++_i5)
         {
           byte[] _key6;
           TCell _val7;
           _key6 = iprot.ReadBinary();
           _val7 = new TCell();
           _val7.Read(iprot);
           this.columns[_key6] = _val7;
         }
         iprot.ReadMapEnd();
       }
       this.__isset.columns = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
All Usage Examples Of Apache.Hadoop.Hbase.Thrift.TCell::Read