Beispiel #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.List) {
       {
         Values = new List<string>();
         TList _list75 = iprot.ReadListBegin();
         for( int _i76 = 0; _i76 < _list75.Count; ++_i76)
         {
           string _elem77 = null;
           _elem77 = iprot.ReadString();
           Values.Add(_elem77);
         }
         iprot.ReadListEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.String) {
       DbName = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 3:
     if (field.Type == TType.String) {
       TableName = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 4:
     if (field.Type == TType.I32) {
       CreateTime = iprot.ReadI32();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 5:
     if (field.Type == TType.I32) {
       LastAccessTime = iprot.ReadI32();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 6:
     if (field.Type == TType.Struct) {
       Sd = new StorageDescriptor();
       Sd.Read(iprot);
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 7:
     if (field.Type == TType.Map) {
       {
         Parameters = new Dictionary<string, string>();
         TMap _map78 = iprot.ReadMapBegin();
         for( int _i79 = 0; _i79 < _map78.Count; ++_i79)
         {
           string _key80;
           string _val81;
           _key80 = iprot.ReadString();
           _val81 = iprot.ReadString();
           Parameters[_key80] = _val81;
         }
         iprot.ReadMapEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 8:
     if (field.Type == TType.Struct) {
       Privileges = new PrincipalPrivilegeSet();
       Privileges.Read(iprot);
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
Beispiel #2
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) {
       IndexName = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.String) {
       IndexHandlerClass = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 3:
     if (field.Type == TType.String) {
       DbName = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 4:
     if (field.Type == TType.String) {
       OrigTableName = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 5:
     if (field.Type == TType.I32) {
       CreateTime = iprot.ReadI32();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 6:
     if (field.Type == TType.I32) {
       LastAccessTime = iprot.ReadI32();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 7:
     if (field.Type == TType.String) {
       IndexTableName = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 8:
     if (field.Type == TType.Struct) {
       Sd = new StorageDescriptor();
       Sd.Read(iprot);
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 9:
     if (field.Type == TType.Map) {
       {
         Parameters = new Dictionary<string, string>();
         TMap _map84 = iprot.ReadMapBegin();
         for( int _i85 = 0; _i85 < _map84.Count; ++_i85)
         {
           string _key86;
           string _val87;
           _key86 = iprot.ReadString();
           _val87 = iprot.ReadString();
           Parameters[_key86] = _val87;
         }
         iprot.ReadMapEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 10:
     if (field.Type == TType.Bool) {
       DeferredRebuild = iprot.ReadBool();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
Beispiel #3
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) {
       TableName = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.String) {
       DbName = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 3:
     if (field.Type == TType.String) {
       Owner = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 4:
     if (field.Type == TType.I32) {
       CreateTime = iprot.ReadI32();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 5:
     if (field.Type == TType.I32) {
       LastAccessTime = iprot.ReadI32();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 6:
     if (field.Type == TType.I32) {
       Retention = iprot.ReadI32();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 7:
     if (field.Type == TType.Struct) {
       Sd = new StorageDescriptor();
       Sd.Read(iprot);
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 8:
     if (field.Type == TType.List) {
       {
         PartitionKeys = new List<FieldSchema>();
         TList _list66 = iprot.ReadListBegin();
         for( int _i67 = 0; _i67 < _list66.Count; ++_i67)
         {
           FieldSchema _elem68 = new FieldSchema();
           _elem68 = new FieldSchema();
           _elem68.Read(iprot);
           PartitionKeys.Add(_elem68);
         }
         iprot.ReadListEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 9:
     if (field.Type == TType.Map) {
       {
         Parameters = new Dictionary<string, string>();
         TMap _map69 = iprot.ReadMapBegin();
         for( int _i70 = 0; _i70 < _map69.Count; ++_i70)
         {
           string _key71;
           string _val72;
           _key71 = iprot.ReadString();
           _val72 = iprot.ReadString();
           Parameters[_key71] = _val72;
         }
         iprot.ReadMapEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 10:
     if (field.Type == TType.String) {
       ViewOriginalText = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 11:
     if (field.Type == TType.String) {
       ViewExpandedText = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 12:
     if (field.Type == TType.String) {
       TableType = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 13:
     if (field.Type == TType.Struct) {
       Privileges = new PrincipalPrivilegeSet();
       Privileges.Read(iprot);
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }