Apache.Hadoop.Hive.UnknownDBException.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;
              iprot.ReadStructBegin();
              while (true)
              {
            field = iprot.ReadFieldBegin();
            if (field.Type == TType.Stop) {
              break;
            }
            switch (field.ID)
            {
              case 1:
            if (field.Type == TType.String) {
              Message = iprot.ReadString();
            } else {
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
              default:
            TProtocolUtil.Skip(iprot, field.Type);
            break;
            }
            iprot.ReadFieldEnd();
              }
              iprot.ReadStructEnd();
        }

Usage Example

示例#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 0:
                 if (field.Type == TType.List)
                 {
                     {
                         Success = new List<FieldSchema>();
                         TList _list115 = iprot.ReadListBegin();
                         for (int _i116 = 0; _i116 < _list115.Count; ++_i116)
                         {
                             FieldSchema _elem117 = new FieldSchema();
                             _elem117 = new FieldSchema();
                             _elem117.Read(iprot);
                             Success.Add(_elem117);
                         }
                         iprot.ReadListEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 1:
                 if (field.Type == TType.Struct)
                 {
                     O1 = new MetaException();
                     O1.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.Struct)
                 {
                     O2 = new UnknownTableException();
                     O2.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 3:
                 if (field.Type == TType.Struct)
                 {
                     O3 = new UnknownDBException();
                     O3.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }