Skip to content

Commit 8db504f

Browse files
committed
feat: Change hive kerberos auuthorization config key
1 parent 072f392 commit 8db504f

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
@@ -268,19 +268,15 @@ catalog:
268268
catalog:
269269
default:
270270
uri: thrift://localhost:9083
271-
hive:
272-
hive2-compatible: true
273-
use-kerberos: true
271+
hive.hive2-compatible: true
272+
hive.kerberos-authorization: true
273+
s3.endpoint: http://localhost:9000
274274
```
275275

276-
<!-- markdown-link-check-disable -->
277-
278-
| Key | Example | Description |
279-
| --------------------- | ------- | --------------------------------- |
280-
| hive.hive2-compatible | true | Using Hive 2.x compatibility mode |
281-
| hive.use-kerberos | true | Using authentication via Kerberos |
282-
283-
<!-- markdown-link-check-enable-->
276+
| Key | Example | Description |
277+
| --------------------------- | ------- | --------------------------------- |
278+
| hive.hive2-compatible | true | Using Hive 2.x compatibility mode |
279+
| hive.kerberos-authorization | true | Using authentication via Kerberos |
284280

285281
### Glue Catalog
286282

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)