protected virtual void Dispose(bool disposing) { if (disposing) { Close(); m_Client = null; m_Transport = null; m_Session = null; } }
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; }
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; }
protected override void OnDispose(Boolean disposing) { base.OnDispose(disposing); try { Close(); } catch { } _Client = null; _Transport = null; _Session = null; }