Inheritance: TBase
コード例 #1
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.String)
                    {
                        Row = iprot.ReadBinary();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Map)
                    {
                        {
                            Columns = new Dictionary <byte[], TCell>(new Lib.Comm.ByteArrayComparer());
                            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);
                                Columns[_key6] = _val7;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
コード例 #2
0
ファイル: TRowResult.cs プロジェクト: zbw911/CS4Hadoop
 public void Read(TProtocol iprot)
 {
     TField field;
       iprot.ReadStructBegin();
       while (true)
       {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) {
       break;
     }
     switch (field.ID)
     {
       case 1:
     if (field.Type == TType.String) {
       Row = iprot.ReadBinary();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.Map) {
       {
           Columns = new Dictionary<byte[], TCell>(new Lib.Comm.ByteArrayComparer());
         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);
           Columns[_key6] = _val7;
         }
         iprot.ReadMapEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
コード例 #3
0
ファイル: Hbase.cs プロジェクト: zbw911/CS4Hadoop
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop)
         {
             break;
         }
         switch (field.ID)
         {
             case 0:
                 if (field.Type == TType.List)
                 {
                     {
                         Success = new List<TCell>();
                         TList _list26 = iprot.ReadListBegin();
                         for (int _i27 = 0; _i27 < _list26.Count; ++_i27)
                         {
                             TCell _elem28 = new TCell();
                             _elem28 = new TCell();
                             _elem28.Read(iprot);
                             Success.Add(_elem28);
                         }
                         iprot.ReadListEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 1:
                 if (field.Type == TType.Struct)
                 {
                     Io = new IOError();
                     Io.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }