public OpenConnectionArgs deepCopy() { return new OpenConnectionArgs(this); }
ClientConnection(String host, int port, String userName, String password, Map<String, String> props) throws SQLException { try { this.isOpen = false; // TODO: current hardcoded security mechanism to PLAIN // implement Diffie-Hellman and additional like SASL (see Hive driver) OpenConnectionArgs connArgs = new OpenConnectionArgs() .setSecurity(SecurityMechanism.PLAIN).setUserName(userName) .setPassword(password).setProperties(props); this.clientService = new ClientService(host, port, connArgs); initTXHost(this.clientService); this.finalizer = new ClientFinalizer(this, this.clientService, gfxdConstants.BULK_CLOSE_CONNECTION); // don't need to call updateReferentData on finalizer for connection // since ClientFinalizer will extract the same from current host // information in ClientService for the special case of connection this.isOpen = true; } catch (GFXDException gfxde) { throw ThriftExceptionUtil.newSQLException(gfxde); } }