Exemplo n.º 1
0
        public void Read(TProtocol iprot)
        {
            var    isset_sessionHandle = false;
            var    isset_infoType      = false;
            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)
                    {
                        SessionHandle = new TSessionHandle();
                        SessionHandle.Read(iprot);
                        isset_sessionHandle = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        InfoType       = (TGetInfoType)iprot.ReadI32();
                        isset_infoType = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_sessionHandle)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_infoType)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
Exemplo n.º 2
0
        public void Read(TProtocol iprot)
        {
            var    isset_sessionHandle = false;
            var    isset_functionName  = false;
            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)
                    {
                        SessionHandle = new TSessionHandle();
                        SessionHandle.Read(iprot);
                        isset_sessionHandle = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

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

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_sessionHandle)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_functionName)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
Exemplo n.º 3
0
 public TGetFunctionsReq(TSessionHandle sessionHandle, String functionName) : this()
 {
     SessionHandle = sessionHandle;
     FunctionName  = functionName;
 }
Exemplo n.º 4
0
 public TGetDelegationTokenReq(TSessionHandle sessionHandle, String owner, String renewer) : this()
 {
     SessionHandle = sessionHandle;
     Owner         = owner;
     Renewer       = renewer;
 }
Exemplo n.º 5
0
 public TGetCatalogsReq(TSessionHandle sessionHandle) : this()
 {
     SessionHandle = sessionHandle;
 }
Exemplo n.º 6
0
 public TGetColumnsReq(TSessionHandle sessionHandle) : this()
 {
     SessionHandle = sessionHandle;
 }
Exemplo n.º 7
0
 public TGetTypeInfoReq(TSessionHandle sessionHandle) : this()
 {
     SessionHandle = sessionHandle;
 }
Exemplo n.º 8
0
 public TCloseSessionReq(TSessionHandle sessionHandle) : this()
 {
     SessionHandle = sessionHandle;
 }
Exemplo n.º 9
0
 public TGetTableTypesReq(TSessionHandle sessionHandle) : this()
 {
     SessionHandle = sessionHandle;
 }
Exemplo n.º 10
0
 public TGetSchemasReq(TSessionHandle sessionHandle) : this()
 {
     SessionHandle = sessionHandle;
 }
Exemplo n.º 11
0
 public TGetInfoReq(TSessionHandle sessionHandle, TGetInfoType infoType) : this()
 {
     SessionHandle = sessionHandle;
     InfoType      = infoType;
 }
Exemplo n.º 12
0
        public void Read(TProtocol iprot)
        {
            var    isset_sessionHandle = false;
            var    isset_statement     = false;
            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)
                    {
                        SessionHandle = new TSessionHandle();
                        SessionHandle.Read(iprot);
                        isset_sessionHandle = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

                case 3:
                    if (field.Type == TType.Map)
                    {
                        {
                            ConfOverlay = new Dictionary <String, String>();
                            var _map81 = iprot.ReadMapBegin();
                            for (var _i82 = 0; _i82 < _map81.Count; ++_i82)
                            {
                                String _key83;
                                String _val84;
                                _key83 = iprot.ReadString();
                                _val84 = iprot.ReadString();
                                ConfOverlay[_key83] = _val84;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_sessionHandle)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_statement)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
Exemplo n.º 13
0
 public TExecuteStatementReq(TSessionHandle sessionHandle, String statement) : this()
 {
     SessionHandle = sessionHandle;
     Statement     = statement;
 }
Exemplo n.º 14
0
 public TCancelDelegationTokenReq(TSessionHandle sessionHandle, String delegationToken) : this()
 {
     SessionHandle   = sessionHandle;
     DelegationToken = delegationToken;
 }
Exemplo n.º 15
0
        public void Read(TProtocol iprot)
        {
            var    isset_sessionHandle = false;
            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)
                    {
                        SessionHandle = new TSessionHandle();
                        SessionHandle.Read(iprot);
                        isset_sessionHandle = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

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

                case 5:
                    if (field.Type == TType.List)
                    {
                        {
                            TableTypes = new List <String>();
                            var _list86 = iprot.ReadListBegin();
                            for (var _i87 = 0; _i87 < _list86.Count; ++_i87)
                            {
                                String _elem88 = null;
                                _elem88 = iprot.ReadString();
                                TableTypes.Add(_elem88);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_sessionHandle)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
Exemplo n.º 16
0
        public void Read(TProtocol iprot)
        {
            var    isset_status = false;
            var    isset_serverProtocolVersion = false;
            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)
                    {
                        Status = new TStatus();
                        Status.Read(iprot);
                        isset_status = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        ServerProtocolVersion       = (TProtocolVersion)iprot.ReadI32();
                        isset_serverProtocolVersion = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        SessionHandle = new TSessionHandle();
                        SessionHandle.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.Map)
                    {
                        {
                            Configuration = new Dictionary <String, String>();
                            var _map76 = iprot.ReadMapBegin();
                            for (var _i77 = 0; _i77 < _map76.Count; ++_i77)
                            {
                                String _key78;
                                String _val79;
                                _key78 = iprot.ReadString();
                                _val79 = iprot.ReadString();
                                Configuration[_key78] = _val79;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_status)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_serverProtocolVersion)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }