コード例 #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.Struct)
                 {
                     Success = new PrincipalPrivilegeSet();
                     Success.Read(iprot);
                 }
                 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;
             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 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();
        }
コード例 #3
0
ファイル: Partition.cs プロジェクト: ahweb/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.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();
        }
コード例 #4
0
ファイル: Database.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) {
       Name = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.String) {
       Description = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 3:
     if (field.Type == TType.String) {
       LocationUri = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 4:
     if (field.Type == TType.Map) {
       {
         Parameters = new Dictionary<string, string>();
         TMap _map39 = iprot.ReadMapBegin();
         for( int _i40 = 0; _i40 < _map39.Count; ++_i40)
         {
           string _key41;
           string _val42;
           _key41 = iprot.ReadString();
           _val42 = iprot.ReadString();
           Parameters[_key41] = _val42;
         }
         iprot.ReadMapEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 5:
     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();
 }
コード例 #5
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)
                    {
                        Name = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

                case 4:
                    if (field.Type == TType.Map)
                    {
                        {
                            Parameters = new Dictionary <string, string>();
                            TMap _map39 = iprot.ReadMapBegin();
                            for (int _i40 = 0; _i40 < _map39.Count; ++_i40)
                            {
                                string _key41;
                                string _val42;
                                _key41             = iprot.ReadString();
                                _val42             = iprot.ReadString();
                                Parameters[_key41] = _val42;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 5:
                    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();
        }
コード例 #6
0
ファイル: Partition.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.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();
 }
コード例 #7
0
ファイル: Table.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) {
       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();
 }