예제 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         Close();
         m_Client    = null;
         m_Transport = null;
         m_Session   = null;
     }
 }
예제 #2
0
        public HiveConnection(String host, Int32 port, String userName = "******", String password = "******", TProtocolVersion version = TProtocolVersion.V7)
        {
            var socket = new TSocket(host, port);

            _Transport = new TSaslClientTransport(socket, userName, password);
            var protocol = new TBinaryProtocol(_Transport);

            _Client = new TCLIService.Client(protocol);
            Version = version;
        }
예제 #3
0
        public Connection(string host, int port, string userName = "******", string password = "******",
                          TProtocolVersion version = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V7)
        {
            var socket = new TSocket(host, port);

            m_Transport = new TSaslClientTransport(socket, userName, password);
            var protocol = new TBinaryProtocol(m_Transport);

            m_Client  = new TCLIService.Client(protocol);
            m_Version = version;
        }
예제 #4
0
        protected override void OnDispose(Boolean disposing)
        {
            base.OnDispose(disposing);

            try
            {
                Close();
            }
            catch { }

            _Client    = null;
            _Transport = null;
            _Session   = null;
        }