Пример #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.Struct)
                 {
                     New_part = new Partition();
                     New_part.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Пример #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 0:
                 if (field.Type == TType.Struct)
                 {
                     Success = new Partition();
                     Success.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 1:
                 if (field.Type == TType.Struct)
                 {
                     O1 = new InvalidObjectException();
                     O1.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.Struct)
                 {
                     O2 = new AlreadyExistsException();
                     O2.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 3:
                 if (field.Type == TType.Struct)
                 {
                     O3 = new MetaException();
                     O3.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Пример #3
0
 public void send_alter_partition(string db_name, string tbl_name, Partition new_part)
 {
     oprot_.WriteMessageBegin(new TMessage("alter_partition", TMessageType.Call, seqid_));
     alter_partition_args args = new alter_partition_args();
     args.Db_name = db_name;
     args.Tbl_name = tbl_name;
     args.New_part = new_part;
     args.Write(oprot_);
     oprot_.WriteMessageEnd();
     oprot_.Transport.Flush();
 }
Пример #4
0
 public void send_add_partition(Partition new_part)
 {
     oprot_.WriteMessageBegin(new TMessage("add_partition", TMessageType.Call, seqid_));
     add_partition_args args = new add_partition_args();
     args.New_part = new_part;
     args.Write(oprot_);
     oprot_.WriteMessageEnd();
     oprot_.Transport.Flush();
 }
Пример #5
0
 public void alter_partition(string db_name, string tbl_name, Partition new_part)
 {
     send_alter_partition(db_name, tbl_name, new_part);
     recv_alter_partition();
 }
Пример #6
0
 public Partition add_partition(Partition new_part)
 {
     send_add_partition(new_part);
     return recv_add_partition();
 }
Пример #7
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<Partition>();
                         TList _list155 = iprot.ReadListBegin();
                         for (int _i156 = 0; _i156 < _list155.Count; ++_i156)
                         {
                             Partition _elem157 = new Partition();
                             _elem157 = new Partition();
                             _elem157.Read(iprot);
                             Success.Add(_elem157);
                         }
                         iprot.ReadListEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 1:
                 if (field.Type == TType.Struct)
                 {
                     O1 = new NoSuchObjectException();
                     O1.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.Struct)
                 {
                     O2 = new MetaException();
                     O2.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }