Skip to content

Commit a627aa8

Browse files
committed
call transport.open()
1 parent a8f86ce commit a627aa8

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
@@ -146,6 +146,7 @@ def __init__(self, uri: str, ugi: Optional[str] = None, kerberos_auth: Optional[
146146
self._uri = uri
147147
self._kerberos_auth = kerberos_auth
148148
self._ugi = ugi.split(":") if ugi else None
149+
self._transport = self._init_thrift_transport()
149150

150151
def _init_thrift_transport(self) -> TTransport:
151152
url_parts = urlparse(self._uri)
@@ -157,7 +158,6 @@ def _init_thrift_transport(self) -> TTransport:
157158

158159
@cached_property
159160
def _client(self) -> Client:
160-
self._transport = self._init_thrift_transport()
161161
protocol = TBinaryProtocol.TBinaryProtocol(self._transport)
162162
client = Client(protocol)
163163
if self._ugi:
@@ -168,6 +168,7 @@ def __enter__(self) -> Client:
168168
"""Reinitialize transport if was closed."""
169169
if self._transport and not self._transport.isOpen():
170170
self._transport = self._init_thrift_transport()
171+
self._transport.open()
171172
return self._client
172173

173174
def __exit__(

0 commit comments

Comments
 (0)