Skip to content

Commit f40e75f

Browse files
committed
call transport.open()
1 parent f0b4003 commit f40e75f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyiceberg/catalog/hive.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ def __init__(self, uri: str, ugi: Optional[str] = None, kerberos_auth: Optional[
147147
self._uri = uri
148148
self._kerberos_auth = kerberos_auth
149149
self._ugi = ugi.split(":") if ugi else None
150+
self._transport = self._init_thrift_transport()
150151

151152
def _init_thrift_transport(self) -> TTransport:
152153
url_parts = urlparse(self._uri)
@@ -158,7 +159,6 @@ def _init_thrift_transport(self) -> TTransport:
158159

159160
@cached_property
160161
def _client(self) -> Client:
161-
self._transport = self._init_thrift_transport()
162162
protocol = TBinaryProtocol.TBinaryProtocol(self._transport)
163163
client = Client(protocol)
164164
if self._ugi:
@@ -169,6 +169,7 @@ def __enter__(self) -> Client:
169169
"""Reinitialize transport if was closed."""
170170
if self._transport and not self._transport.isOpen():
171171
self._transport = self._init_thrift_transport()
172+
self._transport.open()
172173
return self._client
173174

174175
def __exit__(

0 commit comments

Comments
 (0)