void IDisposable.Dispose() { lock (this) { try { this.service.close(this.queryHandle); } catch { // ignore } } this.queryHandle = null; this.service = null; }
/// <summary> /// Connect to impalad and construct ImpalaService.Client. /// </summary> protected void Connect() { var socket = new TSocket(this.ConnectionParameter.Host, this.ConnectionParameter.Port); this.disposer.Add(socket); this.transport = new TBufferedTransport(socket); this.disposer.Add(this.transport); this.transport.Open(); var protocol = new TBinaryProtocol(this.transport); this.disposer.Add(protocol); this.service = new ImpalaService.Client(protocol); this.disposer.Add(this.service); var pingResult = this.service.PingImpalaService(); this.ServerVersion = pingResult.Version; }
public QueryHandleWrapper(ImpalaService.Client svc, QueryHandle qh) { this.queryHandle = qh; this.service = svc; }