Skip to content

Commit f2b2522

Browse files
committed
feat: Change hive kerberos auuthorization config key
1 parent d17b7ce commit f2b2522

2 files changed

Lines changed: 10 additions & 14 deletions

File tree

mkdocs/docs/configuration.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -228,19 +228,15 @@ catalog:
228228
catalog:
229229
default:
230230
uri: thrift://localhost:9083
231-
hive:
232-
hive2-compatible: true
233-
use-kerberos: true
231+
hive.hive2-compatible: true
232+
hive.kerberos-authorization: true
233+
s3.endpoint: http://localhost:9000
234234
```
235235

236-
<!-- markdown-link-check-disable -->
237-
238-
| Key | Example | Description |
239-
| --------------------- | ------- | --------------------------------- |
240-
| hive.hive2-compatible | true | Using Hive 2.x compatibility mode |
241-
| hive.use-kerberos | true | Using authentication via Kerberos |
242-
243-
<!-- markdown-link-check-enable-->
236+
| Key | Example | Description |
237+
| --------------------------- | ------- | --------------------------------- |
238+
| hive.hive2-compatible | true | Using Hive 2.x compatibility mode |
239+
| hive.kerberos-authorization | true | Using authentication via Kerberos |
244240

245241
## Glue Catalog
246242

pyiceberg/catalog/hive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
HIVE2_COMPATIBLE = "hive.hive2-compatible"
122122
HIVE2_COMPATIBLE_DEFAULT = False
123123

124-
HIVE_KERBEROS_AUTH = "hive.use-kerberos"
124+
HIVE_KERBEROS_AUTH = "hive.kerberos-authorization"
125125
HIVE_KERBEROS_AUTH_DEFAULT = False
126126

127127
LOCK_CHECK_MIN_WAIT_TIME = "lock-check-min-wait-time"
@@ -141,12 +141,12 @@ class _HiveClient:
141141
_client: Client
142142
_ugi: Optional[List[str]]
143143

144-
def __init__(self, uri: str, ugi: Optional[str] = None, use_kerberos: Optional[bool] = HIVE_KERBEROS_AUTH_DEFAULT):
144+
def __init__(self, uri: str, ugi: Optional[str] = None, kerberos_auth: Optional[bool] = HIVE_KERBEROS_AUTH_DEFAULT):
145145
url_parts = urlparse(uri)
146146

147147
transport = TSocket.TSocket(url_parts.hostname, url_parts.port)
148148

149-
if not use_kerberos:
149+
if not kerberos_auth:
150150
self._transport = TTransport.TBufferedTransport(transport)
151151
else:
152152
self._transport = TTransport.TSaslClientTransport(transport, host=url_parts.hostname, service="hive")

0 commit comments

Comments
 (0)