Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3295] fix(catalog-hive):The Hive Catalog Bug In Multiple Kerberized…
… HMS (#3321) ### What changes were proposed in this pull request? remove PRINCIPAL -> METASTORE_KERBEROS_PRINCIPAL in the GRAVITINO_CONFIG_TO_HIVE ### Why are the changes needed? The hive.metastore.kerberos.principal is not the same as kerberos.principal functionally. Fix: #3295 ### Does this PR introduce _any_ user-facing change? yes, add the document ### How was this patch tested? existing test (TestHiveCatalogOperations) #### test in inner environment as follow: step 1 Install gravitino in host1, Install HMS1 in host1, and install HMS2 in host2 step 2 create catalog1 for HMS1: curl -L -X POST 'http://host1:8090/api/metalakes/mk1/catalogs' -H 'Content-Type: application/json' -H 'Accept: application/vnd.gravitino.v1+json' --data-raw '{ "name": "catalog1", "type": "relational", "provider": "hive", "properties": { "metastore.uris": "thrift://host1:7004", "kerberos.principal": "hadoop/[[email protected]](mailto:[email protected])", "kerberos.keytab-uri": "/var/krb5kdc/emr.keytab", "gravitino.bypass.hadoop.security.authentication": "kerberos", "gravitino.bypass.hive.metastore.kerberos.principal": "hadoop/[[email protected]](mailto:[email protected])", "gravitino.bypass.hive.metastore.sasl.enabled": true } }' step 3 create catalog1 for HMS1: curl -L -X POST 'http://host1:8090/api/metalakes/mk1/catalogs' -H 'Content-Type: application/json' -H 'Accept: application/vnd.gravitino.v1+json' --data-raw '{ "name": "catalog2", "type": "relational", "provider": "hive", "properties": { "metastore.uris": "thrift://host2:7004", "kerberos.principal": "hadoop/[[email protected]](mailto:[email protected])", "kerberos.keytab-uri": "/var/krb5kdc/emr.keytab", "gravitino.bypass.hadoop.security.authentication": "kerberos", "gravitino.bypass.hive.metastore.kerberos.principal": "hadoop/[[email protected]](mailto:[email protected])", "gravitino.bypass.hive.metastore.sasl.enabled": true } }' step 4 curl -L -X GET 'http://host1:8090/api/metalakes/mk1/catalogs/catalog1/schemas' success curl -L -X GET 'http://host1:8090/api/metalakes/mk1/catalogs/catalog2/schemas' success Co-authored-by: theoryxu <[email protected]>
- Loading branch information