Exemplo n.º 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) {
       {
         Cols = new List<FieldSchema>();
         TList _list49 = iprot.ReadListBegin();
         for( int _i50 = 0; _i50 < _list49.Count; ++_i50)
         {
           FieldSchema _elem51 = new FieldSchema();
           _elem51 = new FieldSchema();
           _elem51.Read(iprot);
           Cols.Add(_elem51);
         }
         iprot.ReadListEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.String) {
       Location = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 3:
     if (field.Type == TType.String) {
       InputFormat = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 4:
     if (field.Type == TType.String) {
       OutputFormat = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 5:
     if (field.Type == TType.Bool) {
       Compressed = iprot.ReadBool();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 6:
     if (field.Type == TType.I32) {
       NumBuckets = iprot.ReadI32();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 7:
     if (field.Type == TType.Struct) {
       SerdeInfo = new SerDeInfo();
       SerdeInfo.Read(iprot);
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 8:
     if (field.Type == TType.List) {
       {
         BucketCols = new List<string>();
         TList _list52 = iprot.ReadListBegin();
         for( int _i53 = 0; _i53 < _list52.Count; ++_i53)
         {
           string _elem54 = null;
           _elem54 = iprot.ReadString();
           BucketCols.Add(_elem54);
         }
         iprot.ReadListEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 9:
     if (field.Type == TType.List) {
       {
         SortCols = new List<Order>();
         TList _list55 = iprot.ReadListBegin();
         for( int _i56 = 0; _i56 < _list55.Count; ++_i56)
         {
           Order _elem57 = new Order();
           _elem57 = new Order();
           _elem57.Read(iprot);
           SortCols.Add(_elem57);
         }
         iprot.ReadListEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 10:
     if (field.Type == TType.Map) {
       {
         Parameters = new Dictionary<string, string>();
         TMap _map58 = iprot.ReadMapBegin();
         for( int _i59 = 0; _i59 < _map58.Count; ++_i59)
         {
           string _key60;
           string _val61;
           _key60 = iprot.ReadString();
           _val61 = iprot.ReadString();
           Parameters[_key60] = _val61;
         }
         iprot.ReadMapEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
Exemplo n.º 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.List)
                    {
                        {
                            Cols = new List <FieldSchema>();
                            TList _list49 = iprot.ReadListBegin();
                            for (int _i50 = 0; _i50 < _list49.Count; ++_i50)
                            {
                                FieldSchema _elem51 = new FieldSchema();
                                _elem51 = new FieldSchema();
                                _elem51.Read(iprot);
                                Cols.Add(_elem51);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.String)
                    {
                        Location = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.String)
                    {
                        InputFormat = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.String)
                    {
                        OutputFormat = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 5:
                    if (field.Type == TType.Bool)
                    {
                        Compressed = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 6:
                    if (field.Type == TType.I32)
                    {
                        NumBuckets = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 7:
                    if (field.Type == TType.Struct)
                    {
                        SerdeInfo = new SerDeInfo();
                        SerdeInfo.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 8:
                    if (field.Type == TType.List)
                    {
                        {
                            BucketCols = new List <string>();
                            TList _list52 = iprot.ReadListBegin();
                            for (int _i53 = 0; _i53 < _list52.Count; ++_i53)
                            {
                                string _elem54 = null;
                                _elem54 = iprot.ReadString();
                                BucketCols.Add(_elem54);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 9:
                    if (field.Type == TType.List)
                    {
                        {
                            SortCols = new List <Order>();
                            TList _list55 = iprot.ReadListBegin();
                            for (int _i56 = 0; _i56 < _list55.Count; ++_i56)
                            {
                                Order _elem57 = new Order();
                                _elem57 = new Order();
                                _elem57.Read(iprot);
                                SortCols.Add(_elem57);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 10:
                    if (field.Type == TType.Map)
                    {
                        {
                            Parameters = new Dictionary <string, string>();
                            TMap _map58 = iprot.ReadMapBegin();
                            for (int _i59 = 0; _i59 < _map58.Count; ++_i59)
                            {
                                string _key60;
                                string _val61;
                                _key60             = iprot.ReadString();
                                _val61             = iprot.ReadString();
                                Parameters[_key60] = _val61;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }