def _refresh_thrift_client(self): """Refresh the Thrift socket, transport, and client.""" socket = TSocket(self.host, self.port) if self.timeout is not None: socket.set_timeout(self.timeout) self.transport = self._transport_class(socket) if self.use_kerberos: self.transport = TSaslClientTransport(self.transport, self.host, self.sasl_service_name) protocol = self._protocol_class(self.transport, decode_response=False) self.client = TClient(Hbase, protocol)
def _refresh_thrift_client(self): """Refresh the Thrift socket, transport, and client.""" socket = TSocket(self.host, self.port) if self.timeout is not None: socket.set_timeout(self.timeout) self.transport = self._transport_class(socket) if self.use_kerberos: self.transport = TSaslClientTransport( self.transport, self.host, self.sasl_service_name, generate_tickets=self.generate_tickets, using_keytab=self.using_keytab, principal=self.principal, keytab_file=self.keytab_file, ccache_file=self.ccache_file, password=self.password) protocol = self._protocol_class(self.transport, decode_response=False) self.client = TClient(Hbase, protocol)
def set_timeout(cls, socket, timeout): socket.set_timeout(timeout)
def set_timeout(cls, socket, timeout): socket.set_timeout(timeout)