This is an automated email from the ASF dual-hosted git repository.

luzhijing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new e39ed14abc [doc][kerberos] add kerberos doc for hive catalog (#800)
e39ed14abc is described below

commit e39ed14abcd9b8e74ad308bf320a24faf3006d78
Author: slothever <18522955+w...@users.noreply.github.com>
AuthorDate: Tue Jul 2 20:08:01 2024 +0800

    [doc][kerberos] add kerberos doc for hive catalog (#800)
    
    add doc for https://github.com/apache/doris/pull/36430
    
    ---------
    
    Co-authored-by: Luzhijing <82810928+luzhij...@users.noreply.github.com>
---
 docs/lakehouse/datalake-analytics/hive.md          | 132 +++++++++++---
 .../current/lakehouse/datalake-analytics/hive.md   | 201 +++++++++++++-------
 .../lakehouse/datalake-analytics/hive.md           | 203 ++++++++++++++-------
 .../lakehouse/datalake-analytics/hive.md           | 132 +++++++++++---
 4 files changed, 485 insertions(+), 183 deletions(-)

diff --git a/docs/lakehouse/datalake-analytics/hive.md 
b/docs/lakehouse/datalake-analytics/hive.md
index ab0830d830..00b276b7a9 100644
--- a/docs/lakehouse/datalake-analytics/hive.md
+++ b/docs/lakehouse/datalake-analytics/hive.md
@@ -89,7 +89,7 @@ CREATE CATALOG hive PROPERTIES (
 
 ViewFs related parameters can be added to the catalog configuration as above, 
or added to `conf/core-site.xml`.
 
-How ViewFs works and parameter configuration, please refer to relevant hadoop 
documents, for example, 
https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/ViewFs.html
+How ViewFs works and parameter configuration, please refer to relevant hadoop 
documents, for example, 
<https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/ViewFs.html>
 
 ### Hive On JuiceFS
 
@@ -285,8 +285,8 @@ Currently, Doris only supports automatic update of metadata 
in Hive Metastore (H
 
 The automatic update feature involves the following parameters in fe.conf:
 
-1. `enable_hms_events_incremental_sync`: This specifies whether to enable 
automatic incremental synchronization for metadata, which is disabled by 
default. 
-2. `hms_events_polling_interval_ms`: This specifies the interval between two 
readings, which is set to 10000 by default. (Unit: millisecond) 
+1. `enable_hms_events_incremental_sync`: This specifies whether to enable 
automatic incremental synchronization for metadata, which is disabled by 
default.
+2. `hms_events_polling_interval_ms`: This specifies the interval between two 
readings, which is set to 10000 by default. (Unit: millisecond)
 3. `hms_events_batch_size_per_rpc`: This specifies the maximum number of 
events that are read at a time, which is set to 500 by default.
 
 To enable automatic update(Excluding Huawei MRS), you need to modify the 
hive-site.xml of HMS and then restart HMS and HiveServer2:
@@ -344,7 +344,7 @@ If you meet error message like `Invalid method name: 
'get_table_req'`, which mea
 
 You can specify the hive version when creating the Catalog. If accessing Hive 
1.1.0 version:
 
-```sql 
+```sql
 CREATE CATALOG hive PROPERTIES (
     'type'='hms',
     'hive.metastore.uris' = 'thrift://172.0.0.1:9083',
@@ -389,7 +389,6 @@ Add following setting when creating an HMS catalog, file 
splitting and scanning
 "broker.name" = "test_broker"
 ```
 
-
 Doris has implemented Broker query support for HMS Catalog Iceberg based on 
the Iceberg `FileIO` interface. If needed, the following configuration can be 
added when creating the HMS Catalog.
 
 ```sql
@@ -412,14 +411,14 @@ To connect to the Hive Metastore with Ranger permission 
verification enabled, yo
 
 1. When creating a Catalog, add:
 
-       ```sql
-       "access_controller.properties.ranger.service.name" = "hive",
-       "access_controller.class" = 
"org.apache.doris.catalog.authorizer.ranger.hive.RangerHiveAccessControllerFactory",
-       ```
+ ```sql
+ "access_controller.properties.ranger.service.name" = "hive",
+ "access_controller.class" = 
"org.apache.doris.catalog.authorizer.ranger.hive.RangerHiveAccessControllerFactory",
+ ```
 
-       > Note:
-       >
-       > `access_controller.properties.ranger.service.name` refers to the type 
of service, such as `hive`, `hdfs`, etc. It is not the value of 
`ranger.plugin.hive.service.name` in the configuration file.
+ > Note:
+ >
+ > `access_controller.properties.ranger.service.name` refers to the type of 
service, such as `hive`, `hdfs`, etc. It is not the value of 
`ranger.plugin.hive.service.name` in the configuration file.
 
 2. Configure all FE environments:
 
@@ -502,32 +501,32 @@ This section mainly introduces how to connect to a Hive + 
HDFS cluster with Kerb
 
 ### Environment preparation
 
-- `krb5.conf`
+* `krb5.conf`
 
-       `krb5.conf` is the configuration file for the Kerberos authentication 
protocol. This file needs to be deployed on all FE and BE nodes. And ensure 
that the Doris cluster can connect to the KDC service recorded in this file.
+ `krb5.conf` is the configuration file for the Kerberos authentication 
protocol. This file needs to be deployed on all FE and BE nodes. And ensure 
that the Doris cluster can connect to the KDC service recorded in this file.
 
-       By default, this file is located in the `/etc` directory of the Hadoop 
cluster. But please contact the Hadoop cluster administrator to obtain the 
correct `krb5.conf` file and deploy it to the `/etc` directory of all FE and BE 
nodes.
+ By default, this file is located in the `/etc` directory of the Hadoop 
cluster. But please contact the Hadoop cluster administrator to obtain the 
correct `krb5.conf` file and deploy it to the `/etc` directory of all FE and BE 
nodes.
 
-       Note that in some cases the file location of `krb5.conf` may depend on 
the environment variable `KRB5_CONFIG` or the `-Djava.security.krb5.conf` in 
the JVM parameters. Please check these properties to determine the exact 
location of `krb5.conf`.
+ Note that in some cases the file location of `krb5.conf` may depend on the 
environment variable `KRB5_CONFIG` or the `-Djava.security.krb5.conf` in the 
JVM parameters. Please check these properties to determine the exact location 
of `krb5.conf`.
 
-- JVM parameters
+* JVM parameters
 
-       Please add the following options to the JVM of FE and BE (located in 
`fe.conf` and `be.conf`):
+ Please add the following options to the JVM of FE and BE (located in 
`fe.conf` and `be.conf`):
 
-       - `-Djavax.security.auth.useSubjectCredsOnly=false`
-       - `-Dsun.security.krb5.debug=true`
+       * `-Djavax.security.auth.useSubjectCredsOnly=false`
+       * `-Dsun.security.krb5.debug=true`
 
-       And restart the FE and BE nodes to ensure it takes effect.
+ And restart the FE and BE nodes to ensure it takes effect.
 
 ### Catalog configuration
 
 Normally, to connect to a Kerberos enabled Hive cluster, you need to add the 
following attributes to the Catalog:
 
-- `"hadoop.security.authentication" = "kerberos"`: Enable kerberos 
authentication method.
-- `"hadoop.kerberos.principal" = "your_principal"`: The principal of the HDFS 
namenode. Typically the `dfs.namenode.kerberos.principal` configuration of 
`hdfs-site.xml`.
-- `"hadoop.kerberos.keytab" = "/path/to/your_keytab"`: keytab file of HDFS 
namenode. Typically the `dfs.namenode.keytab.file` configuration of 
`hdfs-site.xml`. Note that this file needs to be deployed to the same directory 
of all FE and BE nodes (can be customized).
-- `"yarn.resourcemanager.principal" = "your_principal"`: The principal of Yarn 
Resource Manager, which can be found in `yarn-site.xml`.
-- `"hive.metastore.kerberos.principal" = "your_principal"`: The principal of 
the Hive metastore. Can be found in `hive-site.xml`.
+* `"hadoop.security.authentication" = "kerberos"`: Enable kerberos 
authentication method.
+* `"hadoop.kerberos.principal" = "your_principal"`: The principal of the HDFS 
namenode. Typically the `dfs.namenode.kerberos.principal` configuration of 
`hdfs-site.xml`.
+* `"hadoop.kerberos.keytab" = "/path/to/your_keytab"`: keytab file of HDFS 
namenode. Typically the `dfs.namenode.keytab.file` configuration of 
`hdfs-site.xml`. Note that this file needs to be deployed to the same directory 
of all FE and BE nodes (can be customized).
+* `"yarn.resourcemanager.principal" = "your_principal"`: The principal of Yarn 
Resource Manager, which can be found in `yarn-site.xml`.
+* `"hive.metastore.kerberos.principal" = "your_principal"`: The principal of 
the Hive metastore. Can be found in `hive-site.xml`.
 
 > Note: Suggest to use `kinit -kt your_principal /path/to/your_keytab` 以及 
 > `klist -k /path/to/your_keytab` to get the ticket or check its validation.
 
@@ -564,6 +563,80 @@ CREATE CATALOG hive_krb_ha PROPERTIES (
 );
 ```
 
+### Multi-Kerberos Cluster Configuration
+
+To access multiple Kerberos-enabled Hadoop clusters simultaneously, you need 
to modify the `krb5.conf` file and configure the 
`hadoop.security.auth_to_local` property. The detailed steps are as follows:
+
+1. Configure Realms in the krb5.conf File
+
+   When configuring multiple clusters, you need to include multiple realms in 
a single `krb5.conf` file. The KDC and admin_server can also be domain names.
+
+    ``` properties
+    [realms]
+    REALM1.COM = {
+      kdc = 172.21.16.8:88
+      admin_server = 172.21.16.8
+    }
+    REALM2.COM = {
+      kdc = kdc_hostname:88
+      admin_server = kdc_hostname
+    }
+    ```
+
+2. Configure domain_realm in the krb5.conf File
+
+   To locate the KDC, use the domain_name in the principal to find the 
corresponding realm.
+
+    ``` properties
+    [libdefaults]
+      dns_lookup_realm = true
+      dns_lookup_kdc = true
+    [domain_realm]
+      .your-host.example = REALM1.COM
+      your-host.example = REALM1.COM
+      .your-other-host.example = REALM2.COM
+      your-other-host.example = REALM2.COM
+    ```
+
+   If not configured correctly, you may see domain_realm-related errors in the 
`log/be.out` or `log/fe.out` of Doris, such as:
+    * Unable to locate KDC for realm / Cannot locate KDC
+    * No service creds
+
+3. Configure Domain-to-Realm Mapping
+
+   To match principals used by different Kerberos services in a multi-cluster 
environment, it's recommended to add or modify the following configuration in 
`core-site.xml`:
+
+    ```xml
+    <property>
+        <name>hadoop.security.auth_to_local</name>
+        <value>RULE:[1:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+               RULE:[2:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+               DEFAULT</value>
+    </property>
+    ```
+
+   If it needs to take effect individually in the Catalog, it can be directly 
configured in the properties:
+
+    ```sql
+    CREATE CATALOG hive_krb PROPERTIES (
+        'type'='hms',
+        'hive.metastore.uris' = 'thrift://172.0.0.1:9083',
+        'hive.metastore.sasl.enabled' = 'true',
+        'hive.metastore.kerberos.principal' = 'your-other-hms-principal',
+        'hadoop.security.authentication' = 'kerberos',
+        'hadoop.kerberos.keytab' = 
'/your-other-keytab-filepath/your-other.keytab',   
+        'hadoop.kerberos.principal' = 'your-other-princi...@your.com',
+        'yarn.resourcemanager.principal' = 'your-other-rm-principal',
+        'hadoop.security.auth_to_local' = 
'RULE:[1:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+                                       RULE:[2:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+                                       DEFAULT'
+    );
+    ```
+
+4. Restart Doris Service
+
+    To verify whether the mapping rules match correctly, check if there are 
any errors such as `NoMatchingRule: No rules applied to 
user/domain_n...@realm.com` when accessing different clusters.
+
 ### Troubleshooting
 
 In case of Kerberos authentication problems, after setting the JVM parameter 
`-Dsun.security.krb5.debug=true`, Kerberos authentication related information 
will be printed in `fe.out` or `be.out`. You can refer to the related errors in 
[FAQ](../../faq/lakehouse-faq) for troubleshooting.
@@ -572,13 +645,14 @@ In case of Kerberos authentication problems, after 
setting the JVM parameter `-D
 
 Hive transactional tables are tables in Hive that support ACID (Atomicity, 
Consistency, Isolation, Durability) semantics. For more details, you can refer 
to: [Hive 
Transactions](https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions).
 
-### Supported Operations for Hive Transactional Tables:
+### Supported Operations for Hive Transactional Tables
+
 |Transactional Table Type|Supported Operations in Hive|Hive Table 
Properties|Supported Hive Versions|
 |---|---|---|---|
 |Full-ACID Transactional Table |Supports insert, update, delete 
operations|'transactional'='true', 
'transactional_properties'='insert_only'|3.x, 2.x (requires major compaction in 
Hive before loading)|
 |Insert-Only Transactional Table|Supports only Insert 
operations|'transactional'='true'|3.x, 2.x|
 
-### Current Limitations:
+### Current Limitations
+
 Currently, it does not support scenarios involving Original Files.
 When a table is transformed into a transactional table, subsequent newly 
written data files will use the schema of the Hive transactional table. 
However, existing data files will not be converted to the schema of the 
transactional table. These existing files are referred to as Original Files.
-
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/datalake-analytics/hive.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/datalake-analytics/hive.md
index bbf5177bcd..74b8f495f9 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/datalake-analytics/hive.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/datalake-analytics/hive.md
@@ -30,11 +30,11 @@ under the License.
 
 ## 使用须知
 
-1. 将 core-site.xml,hdfs-site.xml 和 hive-site.xml  放到 FE 和 BE 的 conf 目录下。优先读取 
conf 目录下的 hadoop 配置文件,再读取环境变量 `HADOOP_CONF_DIR` 的相关配置文件。 
-2. hive 支持 1/2/3 版本。
+1. 将 `core-site.xml`,`hdfs-site.xml` 和 `hive-site.xml` 放到 FE 和 BE 的 `conf` 
目录下。优先读取 `conf` 目录下的 `hadoop` 配置文件,再读取环境变量 `HADOOP_CONF_DIR` 的相关配置文件。
+2. Hive 支持 1/2/3 版本。
 3. 支持 Managed Table 和 External Table,支持部分 Hive View。
-4. 可以识别 Hive Metastore 中存储的 hive、iceberg、hudi 元数据。
-5. 如果 Hadoop 节点配置了 hostname,请确保添加对应的映射关系到 /etc/hosts 文件。
+4. 可以识别 Hive Metastore 中存储的 Hive、Iceberg、Hudi 元数据。
+5. 如果 Hadoop 节点配置了 `hostname`,请确保添加对应的映射关系到 `/etc/hosts` 文件。
 
 ## 创建 Catalog
 
@@ -87,9 +87,9 @@ CREATE CATALOG hive PROPERTIES (
 );
 ```
 
-ViewFS 相关参数可以如上面一样添加到 catalog 配置中,也可以添加到 `conf/core-site.xml` 中。
+ViewFS 相关参数可以如上面一样添加到 Catalog 配置中,也可以添加到 `conf/core-site.xml` 中。
 
-ViewFS 工作原理和参数配置可以参考 hadoop 相关文档,比如 
https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/ViewFs.html
+ViewFS 工作原理和参数配置可以参考 Hadoop 相关文档,比如 [ViewFS 
Guide](https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/ViewFs.html)。
 
 ### Hive On JuiceFS
 
@@ -124,9 +124,9 @@ CREATE CATALOG hive PROPERTIES (
 
 可选属性:
 
-* s3.connection.maximum:s3 最大连接数,默认 50
-* s3.connection.request.timeout:s3 请求超时时间,默认 3000ms
-* s3.connection.timeout:s3 连接超时时间,默认 1000ms
+* s3.connection.maximum:S3 最大连接数,默认 50
+* s3.connection.request.timeout:S3 请求超时时间,默认 3000ms
+* s3.connection.timeout:S3 连接超时时间,默认 1000ms
 
 ### Hive On OSS
 
@@ -166,7 +166,7 @@ CREATE CATALOG hive PROPERTIES (
 
 ### Hive With Glue
 
-> 连接 Glue 时,如果是在非 EC2 环境,需要将 EC2 环境里的 `~/.aws` 目录拷贝到当前环境里。也可以下载[AWS 
Cli](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)工具进行配置,这种方式也会在当前用户目录下创建`.aws`目录。
+> 连接 Glue 时,如果是在非 EC2 环境,需要将 EC2 环境里的 `~/.aws` 目录拷贝到当前环境里。也可以下载 [AWS 
Cli](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
 工具进行配置,这种方式也会在当前用户目录下创建 `.aws` 目录。
 
 ```sql
 CREATE CATALOG hive PROPERTIES (
@@ -193,13 +193,13 @@ CREATE CATALOG hive PROPERTIES (
 
 ### 默认行为和 TTL
 
-默认情况下,元数据缓存会在第一次被填充后的 10 分钟后失效。该时间由 fe.conf 的配置参数 
`external_cache_expire_time_minutes_after_access` 决定。(注意,在 2.0.1 
及以前的版本中,该参数默认值为 1 天)。
+默认情况下,元数据缓存会在第一次被填充后的 10 分钟后失效。该时间由 `fe.conf` 的配置参数 
`external_cache_expire_time_minutes_after_access` 决定。(注意,在 2.0.1 
及以前的版本中,该参数默认值为 1 天)。
 
 例如,用户在 10:00 第一次访问表 A 的元数据,那么这些元数据会被缓存,并且到 10:10 后会自动失效,如果用户在 10:11 
再次访问相同的元数据,则会直接访问 Hive MetaStore 获取信息,并重新填充缓存。
 
 `external_cache_expire_time_minutes_after_access` 会影响 Catalog 下的所有 4 种缓存。
 
-针对 Hive 中常用的 `INSERT INTO OVERWRITE PARTITION` 操作,也可以通过配置 `文件信息缓存` 的 
TTL,来及时的更新 `文件信息缓存`:
+针对 Hive 中常用的 `INSERT INTO OVERWRITE PARTITION` 操作,也可以通过配置 `文件信息缓存` 的 
TTL,来及时地更新 `文件信息缓存`:
 
 ```
 CREATE CATALOG hive PROPERTIES (
@@ -225,7 +225,7 @@ CREATE CATALOG hive PROPERTIES (
 
     该命令会刷新指定 Catalog 的库列表,表列名以及所有缓存信息等。
 
-    `invalid_cache` 表示是否要刷新缓存。默认为 true。如果为 false,则只会刷新 Catalog 
的库、表列表,而不会刷新缓存信息。该参数适用于,用户只想同步新增删的库表信息时。
+    `invalid_cache` 表示是否要刷新缓存。默认为 `true`。如果为 `false`,则只会刷新 Catalog 
的库、表列表,而不会刷新缓存信息。该参数适用于,用户只想同步新增删的库表信息时。
 
 2. REFRESH DATABASE:刷新指定 Database。
 
@@ -235,7 +235,7 @@ CREATE CATALOG hive PROPERTIES (
 
     该命令会刷新指定 Database 的表列名以及 Database 下的所有缓存信息等。
 
-    `invalid_cache` 属性含义同上。默认为 true。如果为 false,则只会刷新 Database 
的表列表,而不会刷新缓存信息。该参数适用于,用户只想同步新增删的表信息时。
+    `invalid_cache` 属性含义同上。默认为 `true`。如果为 `false`,则只会刷新 Database 
的表列表,而不会刷新缓存信息。该参数适用于,用户只想同步新增删的表信息时。
 
 3. REFRESH TABLE: 刷新指定 Table。
 
@@ -267,13 +267,13 @@ CREATE CATALOG hive PROPERTIES (
 
 ### 自动刷新
 
-自动刷新目前仅支持 Hive Metastore 元数据服务。通过让 FE 节点定时读取 HMS 的 notification event 来感知 Hive 
表元数据的变更情况,目前支持处理如下 event:
+自动刷新目前仅支持 Hive Metastore 元数据服务。通过让 FE 节点定时读取 HMS 的 Notification Event 来感知 Hive 
表元数据的变更情况,目前支持处理如下 Event:
 
 |事件 | 事件行为和对应的动作 |
 |---|---|
 | CREATE DATABASE | 在对应数据目录下创建数据库。 |
 | DROP DATABASE | 在对应数据目录下删除数据库。 |
-| ALTER DATABASE  | 此事件的影响主要有更改数据库的属性信息,注释及默认存储位置等,这些改变不影响 doris 
对外部数据目录的查询操作,因此目前会忽略此 event。 |
+| ALTER DATABASE  | 此事件的影响主要有更改数据库的属性信息,注释及默认存储位置等,这些改变不影响 Doris 
对外部数据目录的查询操作,因此目前会忽略此 Event。 |
 | CREATE TABLE | 在对应数据库下创建表。 |
 | DROP TABLE  | 在对应数据库下删除表,并失效表的缓存。 |
 | ALTER TABLE | 如果是重命名,先删除旧名字的表,再用新名字创建表,否则失效该表的缓存。 |
@@ -281,17 +281,17 @@ CREATE CATALOG hive PROPERTIES (
 | DROP PARTITION | 在对应表缓存的分区列表里删除分区,并失效该分区的缓存。 |
 | ALTER PARTITION | 如果是重命名,先删除旧名字的分区,再用新名字创建分区,否则失效该分区的缓存。 |
 
-> 当导入数据导致文件变更,分区表会走 ALTER PARTITION event 逻辑,不分区表会走 ALTER TABLE event 逻辑。
-> 
-> 如果绕过 HMS 直接操作文件系统的话,HMS 不会生成对应事件,doris 因此也无法感知
+> 当导入数据导致文件变更,分区表会走 ALTER PARTITION Event 逻辑,不分区表会走 ALTER TABLE Event 逻辑。
+>
+> 如果绕过 HMS 直接操作文件系统的话,HMS 不会生成对应事件,Doris 因此也无法感知
 
-该特性在 fe.conf 中有如下参数:
+该特性在 `fe.conf` 中有如下参数:
 
 1. `enable_hms_events_incremental_sync`: 是否开启元数据自动增量同步功能,默认关闭。
 2. `hms_events_polling_interval_ms`: 读取 event 的间隔时间,默认值为 10000,单位:毫秒。
 3. `hms_events_batch_size_per_rpc`: 每次读取 event 的最大数量,默认值为 500。
 
-如果想使用该特性 (华为 MRS 除外),需要更改 HMS 的 hive-site.xml 并重启 HMS 和 HiveServer2:
+如果想使用该特性 (华为 MRS 除外),需要更改 HMS 的 `hive-site.xml` 并重启 HMS 和 HiveServer2:
 
 ```
 <property>
@@ -309,7 +309,7 @@ CREATE CATALOG hive PROPERTIES (
 
 ```
 
-华为的 MRS 需要更改 hivemetastore-site.xml 并重启 HMS 和 HiveServer2:
+华为的 MRS 需要更改 `hivemetastore-site.xml` 并重启 HMS 和 HiveServer2:
 
 ```
 <property>
@@ -322,11 +322,11 @@ CREATE CATALOG hive PROPERTIES (
 
 Doris 可以正确访问不同 Hive 版本中的 Hive Metastore。在默认情况下,Doris 会以 Hive 2.3 版本的兼容接口访问 
Hive Metastore。
 
-如在查询时遇到如 `Invalid method name: 'get_table_req'` 类似错误,说明 hive 版本不匹配。
+如在查询时遇到如 `Invalid method name: 'get_table_req'` 类似错误,说明 Hive 版本不匹配。
 
-你可以在创建 Catalog 时指定 hive 的版本。如访问 Hive 1.1.0 版本:
+你可以在创建 Catalog 时指定 Hive 的版本。如访问 Hive 1.1.0 版本:
 
-```sql 
+```sql
 CREATE CATALOG hive PROPERTIES (
     'type'='hms',
     'hive.metastore.uris' = 'thrift://172.0.0.1:9083',
@@ -357,15 +357,15 @@ CREATE CATALOG hive PROPERTIES (
 | `struct<col1: Type1, col2: Type2, ...>` | `struct<col1: Type1, col2: Type2, 
...>` | 支持嵌套,如 `struct<col1: array<int>, col2: map<int, date>>` |
 | other | unsupported | |
 
-> 注:是否按照 hive 表的 schema 来截断 char 或者 varchar 列
+> 注:是否按照 Hive 表的 Schema 来截断 `char` 或者 `varchar` 列
 
-> 如果会话变量 `truncate_char_or_varchar_columns` 开启,则当 hive 表的 schema 中 char 或者 
varchar 列的最大长度和底层 parquet 或者 orc 文件中的 schema 不一致时会按照 hive 表列的最大长度进行截断。
+> 如果会话变量 `truncate_char_or_varchar_columns` 开启,则当 Hive 表的 Schema 中 `char` 或者 
`varchar` 列的最大长度和底层 Parquet 或者 ORC 文件中的 `schema` 不一致时会按照 Hive 表列的最大长度进行截断。
 
-> 该变量默认为 false。
+> 该变量默认为 `false`。
 
 ## 使用 broker 访问 HMS
 
-创建 HMS Catalog 时增加如下配置,Hive 外表文件分片和文件扫描将会由名为 `test_broker` 的 broker 完成
+创建 HMS Catalog 时增加如下配置,Hive 外表文件分片和文件扫描将会由名为 `test_broker` 的 Broker 完成
 
 ```sql
 "broker.name" = "test_broker"
@@ -393,20 +393,20 @@ Doris 支持为指定的 External Hive Catalog 使用 Apache Ranger 进行鉴权
 
 1. 创建 Catalog 时增加:
 
-       ```sql
-       "access_controller.properties.ranger.service.name" = "hive",
-       "access_controller.class" = 
"org.apache.doris.catalog.authorizer.ranger.hive.RangerHiveAccessControllerFactory",
-       ```
+ ```sql
+ "access_controller.properties.ranger.service.name" = "hive",
+ "access_controller.class" = 
"org.apache.doris.catalog.authorizer.ranger.hive.RangerHiveAccessControllerFactory",
+ ```
 
-       >注意:
-       >
-       > `access_controller.properties.ranger.service.name` 指的是 service 的类型,例如 
`hive`,`hdfs` 等。并不是配置文件中 `ranger.plugin.hive.service.name` 的值。
+ >注意:
+ >
+ > `access_controller.properties.ranger.service.name` 指的是 service 的类型,例如 
`hive`,`hdfs` 等。并不是配置文件中 `ranger.plugin.hive.service.name` 的值。
 
 2. 配置所有 FE 环境:
 
-    1. 将 HMS conf 目录下的配置文件 
ranger-hive-audit.xml,ranger-hive-security.xml,ranger-policymgr-ssl.xml 复制到 FE 
的 conf 目录下。
+    1. 将 HMS `conf` 目录下的配置文件 `ranger-hive-audit.xml`, 
`ranger-hive-security.xml`, `ranger-policymgr-ssl.xml` 复制到 FE 的 `conf` 目录下。
 
-    2. 修改 ranger-hive-security.xml 的属性,参考配置如下:
+    2. 修改 `ranger-hive-security.xml` 的属性,参考配置如下:
 
         ```sql
         <?xml version="1.0" encoding="UTF-8"?>
@@ -461,19 +461,19 @@ Doris 支持为指定的 External Hive Catalog 使用 Apache Ranger 进行鉴权
         </configuration>
         ```
 
-    3. 为获取到 Ranger 鉴权本身的日志,可在 `<doris_home>/conf` 目录下添加配置文件 log4j.properties。
+    3. 为获取到 Ranger 鉴权本身的日志,可在 `<doris_home>/conf` 目录下添加配置文件 `log4j.properties`。
 
     4. 重启 FE。
 
 ### 最佳实践
 
-1. 在 ranger 端创建用户 user1 并授权 db1.table1.col1 的查询权限
+1. 在 Ranger 端创建用户 user1 并授权 db1.table1.col1 的查询权限
 
-2. 在 ranger 端创建角色 role1 并授权 db1.table1.col2 的查询权限
+2. 在 Ranger 端创建角色 role1 并授权 db1.table1.col2 的查询权限
 
-3. 在 doris 创建同名用户 user1,user1 将直接拥有 db1.table1.col1 的查询权限
+3. 在 Doris 创建同名用户 user1,user1 将直接拥有 db1.table1.col1 的查询权限
 
-4. 在 doris 创建同名角色 role1,并将 role1 分配给 user1,user1 将同时拥有 db1.table1.col1 和 col2 
的查询权限
+4. 在 Doris 创建同名角色 role1,并将 role1 分配给 user1,user1 将同时拥有 db1.table1.col1 和 col2 
的查询权限
 
 5. Admin 和 Root 用户的权限不受 Apache Ranger 的权限控制
 
@@ -483,32 +483,32 @@ Doris 支持为指定的 External Hive Catalog 使用 Apache Ranger 进行鉴权
 
 ### 环境准备
 
-- `krb5.conf`
+* `krb5.conf`
 
-       `krb5.conf` 是 Kerberos 认证协议的配置文件。需将该文件部署在所有 FE 和 BE 节点上。并确保 Doris 
集群可以和文件中记录的 KDC 服务连通。
+ `krb5.conf` 是 Kerberos 认证协议的配置文件。需将该文件部署在所有 FE 和 BE 节点上。并确保 Doris 集群可以和文件中记录的 
KDC 服务连通。
 
-       默认情况下,该文件位于 Hadoop 集群的 `/etc` 目录下。但请联系 Hadoop 集群管理员获取正确的 `krb5.conf` 
文件,并将其部署到所有 FE 和 BE 节点的 `/etc` 目录下。
+ 默认情况下,该文件位于 Hadoop 集群的 `/etc` 目录下。但请联系 Hadoop 集群管理员获取正确的 `krb5.conf` 
文件,并将其部署到所有 FE 和 BE 节点的 `/etc` 目录下。
 
-       注意,某些情况下,`krb5.conf` 的文件位置可能取决于环境变量 `KRB5_CONFIG` 或 JVM 参数中的 
`-Djava.security.krb5.conf` 参数。请检查这些属性以确定 `krb5.conf` 的确切位置。
+ 注意,某些情况下,`krb5.conf` 的文件位置可能取决于环境变量 `KRB5_CONFIG` 或 JVM 参数中的 
`-Djava.security.krb5.conf` 参数。请检查这些属性以确定 `krb5.conf` 的确切位置。
 
-- JVM 参数
+* JVM 参数
 
-       请在 FE 和 BE 的 JVM 参数中添加如下配置(位于 fe.conf 和 be.conf 中):
+ 请在 FE 和 BE 的 JVM 参数中添加如下配置(位于 `fe.conf` 和 `be.conf` 中):
 
-       - `-Djavax.security.auth.useSubjectCredsOnly=false`
-       - `-Dsun.security.krb5.debug=true`
+  * `-Djavax.security.auth.useSubjectCredsOnly=false`
+  * `-Dsun.security.krb5.debug=true`
 
-       并重启 FE、BE 节点以确保其生效。
+ 并重启 FE、BE 节点以确保其生效。
 
 ### Catalog 配置
 
 通常情况下,连接 Kerberos 认证的 Hive 集群,需要在 Catalog 中添加如下属性:
 
-- `"hadoop.security.authentication" = "kerberos"`:开启 kerberos 认证方式。
--  `"hadoop.kerberos.principal" = "your_principal"`:HDFS namenode 的 
principal。通常是 `hdfs-site.xml` 的 `dfs.namenode.kerberos.principal` 配置。
--  `"hadoop.kerberos.keytab" = "/path/to/your_keytab"`:HDFS namenode 的 keytab 
文件。通常是 `hdfs-site.xml` 的 `dfs.namenode.keytab.file` 配置。注意,这个文件需要部署到所有 FE 和 BE 
节点相同的目录下(可自定义)。
-- `"yarn.resourcemanager.principal" = "your_principal"`:Yarn Resource Manager 
的 principal,可以在 `yarn-site.xml` 中获取。
-- `"hive.metastore.kerberos.principal" = "your_principal"`:Hive metastore 的 
principal。可以再 `hive-site.xml` 中。
+* `"hadoop.security.authentication" = "kerberos"`:开启 kerberos 认证方式。
+* `"hadoop.kerberos.principal" = "your_principal"`:HDFS namenode 的 
principal。通常是 `hdfs-site.xml` 的 `dfs.namenode.kerberos.principal` 配置。
+* `"hadoop.kerberos.keytab" = "/path/to/your_keytab"`:HDFS namenode 的 keytab 
文件。通常是 `hdfs-site.xml` 的 `dfs.namenode.keytab.file` 配置。注意,这个文件需要部署到所有 FE 和 BE 
节点相同的目录下(可自定义)。
+* `"yarn.resourcemanager.principal" = "your_principal"`:Yarn Resource Manager 
的 principal,可以在 `yarn-site.xml` 中获取。
+* `"hive.metastore.kerberos.principal" = "your_principal"`:Hive metastore 的 
principal。可以再 `hive-site.xml` 中。
 
 > 注:建议使用 `kinit -kt your_principal /path/to/your_keytab` 以及 `klist -k 
 > /path/to/your_keytab` 来
 
@@ -545,19 +545,96 @@ CREATE CATALOG hive_krb_ha PROPERTIES (
 );
 ```
 
+### 多 Kerberos 集群配置
+
+如需同时访问多个启用了 Kerberos 的 Hadoop 集群,需要修改 `krb5.conf` 文件并且配置 
`hadoop.security.auth_to_local` 属性,具体操作如下:
+
+1. 在 `krb5.conf` 文件配置 Realms
+
+    配置多集群时,需要把多个 Realm 配置到一个 `krb5.conf` 里头,`kdc` 和 `admin_server` 也可以是域名。
+
+    ``` properties
+    [realms]
+    REALM1.COM = {
+      kdc = 172.21.16.8:88
+      admin_server = 172.21.16.8
+    }
+    REALM2.COM = {
+      kdc = kdc_hostname:88
+      admin_server = kdc_hostname
+    }
+    ```
+
+2. 在 `krb5.conf` 文件配置 `domain_realm`,
+
+    查找 `kdc` 时使用 Principal 中的 `domain_name` 去找相对应的 Realm
+
+    ``` properties
+    [libdefaults]
+      dns_lookup_realm = true
+      dns_lookup_kdc = true
+    [domain_realm]
+      .your-host.example = REALM1.COM
+      your-host.example = REALM1.COM
+      .your-other-host.example = REALM2.COM
+      your-other-host.example = REALM2.COM
+    ```
+
+    如果未正确配置,通常会在 Doris 的 `log/be.out` 或者 `log/fe.out` 看到两种与 `domain_realm` 
有关的错误:
+   * Unable to locate KDC for realm / Cannot locate KDC
+   * No service creds
+
+3. 配置 Domain 到 Realm 的映射
+
+    为了在多集群环境下,能匹配到不同 Kerberos 服用用到的的 Principal,推荐 `core-site.xml` 添加或修改如下配置:
+
+    ```xml
+    <property>
+        <name>hadoop.security.auth_to_local</name>
+        <value>RULE:[1:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+               RULE:[2:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+               DEFAULT</value>
+    </property>
+    ```
+
+    如果需要在 Catalog 中单独生效,可以直接配置在 Properties 中:
+
+    ```sql
+    CREATE CATALOG hive_krb PROPERTIES (
+        'type'='hms',
+        'hive.metastore.uris' = 'thrift://172.0.0.1:9083',
+        'hive.metastore.sasl.enabled' = 'true',
+        'hive.metastore.kerberos.principal' = 'your-other-hms-principal',
+        'hadoop.security.authentication' = 'kerberos',
+        'hadoop.kerberos.keytab' = 
'/your-other-keytab-filepath/your-other.keytab',   
+        'hadoop.kerberos.principal' = 'your-other-princi...@your.com',
+        'yarn.resourcemanager.principal' = 'your-other-rm-principal',
+        'hadoop.security.auth_to_local' = 
'RULE:[1:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+                                       RULE:[2:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+                                       DEFAULT'
+    );
+    ```
+
+4. 重启 Doris 服务
+
+    检验映射规则是否能正确匹配,只要看访问不同集群时是否出现错误:`NoMatchingRule: No rules applied to 
user/domain_n...@realm.com`
+
 ### 问题排查
 
 如遇 Kerberos 认证问题,在设置了 JVM 参数 `-Dsun.security.krb5.debug=true` 后,会在 `fe.out` 或 
`be.out` 中打印 Kerberos 认证相关信息。可以参考 [FAQ](../../faq/lakehouse-faq) 中的相关错误进行排查。
 
 ## Hive Transactional 表
-Hive transactional 表是 Hive 中支持 ACID 
语义的表。详情可见:https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions
 
-### Hive Transactional 表支持情况:
+Hive Transactional 表是 Hive 中支持 ACID 语义的表。详情可见 [Hive 
Transactions](https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions)。
+
+### Hive Transactional 表支持情况
+
 |表类型 | 在 Hive 中支持的操作|Hive 表属性 | 支持的 Hive 版本|
 |---|---|---|---|
-|Full-ACID Transactional Table |支持 Insert, Update, Delete 
操作|'transactional'='true', 'transactional_properties'='insert_only'|3.x,2.x,其中 
2.x 需要在 Hive 中执行完 major compaction 才可以加载|
+|Full-ACID Transactional Table |支持 Insert, Update, Delete 
操作|'transactional'='true', 'transactional_properties'='insert_only'|3.x,2.x,其中 
2.x 需要在 Hive 中执行完 Major Compaction 才可以加载|
 |Insert-Only Transactional Table|只支持 Insert 操作|'transactional'='true'|3.x,2.x|
 
-### 当前限制:
+### 当前限制
+
 目前不支持 Original Files 的场景。
-当一个表转换成 Transactional 表之后,后续新写的数据文件会使用 Hive Transactional 表的 
schema,但是已经存在的数据文件是不会转化成 Transactional 表的 schema,这样的文件称为 Original Files。
+当一个表转换成 Transactional 表之后,后续新写的数据文件会使用 Hive Transactional 表的 
Schema,但是已经存在的数据文件是不会转化成 Transactional 表的 Schema,这样的文件称为 Original Files。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/datalake-analytics/hive.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/datalake-analytics/hive.md
index e9b24aeb6d..74b8f495f9 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/datalake-analytics/hive.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/datalake-analytics/hive.md
@@ -30,11 +30,11 @@ under the License.
 
 ## 使用须知
 
-1. 将 core-site.xml,hdfs-site.xml 和 hive-site.xml  放到 FE 和 BE 的 conf 目录下。优先读取 
conf 目录下的 hadoop 配置文件,再读取环境变量 `HADOOP_CONF_DIR` 的相关配置文件。 
-2. hive 支持 1/2/3 版本。
+1. 将 `core-site.xml`,`hdfs-site.xml` 和 `hive-site.xml` 放到 FE 和 BE 的 `conf` 
目录下。优先读取 `conf` 目录下的 `hadoop` 配置文件,再读取环境变量 `HADOOP_CONF_DIR` 的相关配置文件。
+2. Hive 支持 1/2/3 版本。
 3. 支持 Managed Table 和 External Table,支持部分 Hive View。
-4. 可以识别 Hive Metastore 中存储的 hive、iceberg、hudi 元数据。
-5. 如果 Hadoop 节点配置了 hostname,请确保添加对应的映射关系到 /etc/hosts 文件。
+4. 可以识别 Hive Metastore 中存储的 Hive、Iceberg、Hudi 元数据。
+5. 如果 Hadoop 节点配置了 `hostname`,请确保添加对应的映射关系到 `/etc/hosts` 文件。
 
 ## 创建 Catalog
 
@@ -87,9 +87,9 @@ CREATE CATALOG hive PROPERTIES (
 );
 ```
 
-ViewFS 相关参数可以如上面一样添加到 catalog 配置中,也可以添加到 `conf/core-site.xml` 中。
+ViewFS 相关参数可以如上面一样添加到 Catalog 配置中,也可以添加到 `conf/core-site.xml` 中。
 
-ViewFS 工作原理和参数配置可以参考 hadoop 相关文档,比如 
https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/ViewFs.html
+ViewFS 工作原理和参数配置可以参考 Hadoop 相关文档,比如 [ViewFS 
Guide](https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/ViewFs.html)。
 
 ### Hive On JuiceFS
 
@@ -124,9 +124,9 @@ CREATE CATALOG hive PROPERTIES (
 
 可选属性:
 
-* s3.connection.maximum:s3 最大连接数,默认 50
-* s3.connection.request.timeout:s3 请求超时时间,默认 3000ms
-* s3.connection.timeout:s3 连接超时时间,默认 1000ms
+* s3.connection.maximum:S3 最大连接数,默认 50
+* s3.connection.request.timeout:S3 请求超时时间,默认 3000ms
+* s3.connection.timeout:S3 连接超时时间,默认 1000ms
 
 ### Hive On OSS
 
@@ -166,7 +166,7 @@ CREATE CATALOG hive PROPERTIES (
 
 ### Hive With Glue
 
-> 连接 Glue 时,如果是在非 EC2 环境,需要将 EC2 环境里的 `~/.aws` 目录拷贝到当前环境里。也可以下载[AWS 
Cli](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)工具进行配置,这种方式也会在当前用户目录下创建`.aws`目录。
+> 连接 Glue 时,如果是在非 EC2 环境,需要将 EC2 环境里的 `~/.aws` 目录拷贝到当前环境里。也可以下载 [AWS 
Cli](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
 工具进行配置,这种方式也会在当前用户目录下创建 `.aws` 目录。
 
 ```sql
 CREATE CATALOG hive PROPERTIES (
@@ -193,13 +193,13 @@ CREATE CATALOG hive PROPERTIES (
 
 ### 默认行为和 TTL
 
-默认情况下,元数据缓存会在第一次被填充后的 10 分钟后失效。该时间由 fe.conf 的配置参数 
`external_cache_expire_time_minutes_after_access` 决定。(注意,在 2.0.1 
及以前的版本中,该参数默认值为 1 天)。
+默认情况下,元数据缓存会在第一次被填充后的 10 分钟后失效。该时间由 `fe.conf` 的配置参数 
`external_cache_expire_time_minutes_after_access` 决定。(注意,在 2.0.1 
及以前的版本中,该参数默认值为 1 天)。
 
 例如,用户在 10:00 第一次访问表 A 的元数据,那么这些元数据会被缓存,并且到 10:10 后会自动失效,如果用户在 10:11 
再次访问相同的元数据,则会直接访问 Hive MetaStore 获取信息,并重新填充缓存。
 
 `external_cache_expire_time_minutes_after_access` 会影响 Catalog 下的所有 4 种缓存。
 
-针对 Hive 中常用的 `INSERT INTO OVERWRITE PARTITION` 操作,也可以通过配置 `文件信息缓存` 的 
TTL,来及时的更新 `文件信息缓存`:
+针对 Hive 中常用的 `INSERT INTO OVERWRITE PARTITION` 操作,也可以通过配置 `文件信息缓存` 的 
TTL,来及时地更新 `文件信息缓存`:
 
 ```
 CREATE CATALOG hive PROPERTIES (
@@ -225,7 +225,7 @@ CREATE CATALOG hive PROPERTIES (
 
     该命令会刷新指定 Catalog 的库列表,表列名以及所有缓存信息等。
 
-    `invalid_cache` 表示是否要刷新缓存。默认为 true。如果为 false,则只会刷新 Catalog 
的库、表列表,而不会刷新缓存信息。该参数适用于,用户只想同步新增删的库表信息时。
+    `invalid_cache` 表示是否要刷新缓存。默认为 `true`。如果为 `false`,则只会刷新 Catalog 
的库、表列表,而不会刷新缓存信息。该参数适用于,用户只想同步新增删的库表信息时。
 
 2. REFRESH DATABASE:刷新指定 Database。
 
@@ -235,7 +235,7 @@ CREATE CATALOG hive PROPERTIES (
 
     该命令会刷新指定 Database 的表列名以及 Database 下的所有缓存信息等。
 
-    `invalid_cache` 属性含义同上。默认为 true。如果为 false,则只会刷新 Database 
的表列表,而不会刷新缓存信息。该参数适用于,用户只想同步新增删的表信息时。
+    `invalid_cache` 属性含义同上。默认为 `true`。如果为 `false`,则只会刷新 Database 
的表列表,而不会刷新缓存信息。该参数适用于,用户只想同步新增删的表信息时。
 
 3. REFRESH TABLE: 刷新指定 Table。
 
@@ -267,13 +267,13 @@ CREATE CATALOG hive PROPERTIES (
 
 ### 自动刷新
 
-自动刷新目前仅支持 Hive Metastore 元数据服务。通过让 FE 节点定时读取 HMS 的 notification event 来感知 Hive 
表元数据的变更情况,目前支持处理如下 event:
+自动刷新目前仅支持 Hive Metastore 元数据服务。通过让 FE 节点定时读取 HMS 的 Notification Event 来感知 Hive 
表元数据的变更情况,目前支持处理如下 Event:
 
 |事件 | 事件行为和对应的动作 |
 |---|---|
 | CREATE DATABASE | 在对应数据目录下创建数据库。 |
 | DROP DATABASE | 在对应数据目录下删除数据库。 |
-| ALTER DATABASE  | 此事件的影响主要有更改数据库的属性信息,注释及默认存储位置等,这些改变不影响 doris 
对外部数据目录的查询操作,因此目前会忽略此 event。 |
+| ALTER DATABASE  | 此事件的影响主要有更改数据库的属性信息,注释及默认存储位置等,这些改变不影响 Doris 
对外部数据目录的查询操作,因此目前会忽略此 Event。 |
 | CREATE TABLE | 在对应数据库下创建表。 |
 | DROP TABLE  | 在对应数据库下删除表,并失效表的缓存。 |
 | ALTER TABLE | 如果是重命名,先删除旧名字的表,再用新名字创建表,否则失效该表的缓存。 |
@@ -281,17 +281,17 @@ CREATE CATALOG hive PROPERTIES (
 | DROP PARTITION | 在对应表缓存的分区列表里删除分区,并失效该分区的缓存。 |
 | ALTER PARTITION | 如果是重命名,先删除旧名字的分区,再用新名字创建分区,否则失效该分区的缓存。 |
 
-> 当导入数据导致文件变更,分区表会走 ALTER PARTITION event 逻辑,不分区表会走 ALTER TABLE event 逻辑。
-> 
-> 如果绕过 HMS 直接操作文件系统的话,HMS 不会生成对应事件,doris 因此也无法感知
+> 当导入数据导致文件变更,分区表会走 ALTER PARTITION Event 逻辑,不分区表会走 ALTER TABLE Event 逻辑。
+>
+> 如果绕过 HMS 直接操作文件系统的话,HMS 不会生成对应事件,Doris 因此也无法感知
 
-该特性在 fe.conf 中有如下参数:
+该特性在 `fe.conf` 中有如下参数:
 
 1. `enable_hms_events_incremental_sync`: 是否开启元数据自动增量同步功能,默认关闭。
 2. `hms_events_polling_interval_ms`: 读取 event 的间隔时间,默认值为 10000,单位:毫秒。
 3. `hms_events_batch_size_per_rpc`: 每次读取 event 的最大数量,默认值为 500。
 
-如果想使用该特性 (华为 MRS 除外),需要更改 HMS 的 hive-site.xml 并重启 HMS 和 HiveServer2:
+如果想使用该特性 (华为 MRS 除外),需要更改 HMS 的 `hive-site.xml` 并重启 HMS 和 HiveServer2:
 
 ```
 <property>
@@ -309,7 +309,7 @@ CREATE CATALOG hive PROPERTIES (
 
 ```
 
-华为的 MRS 需要更改 hivemetastore-site.xml 并重启 HMS 和 HiveServer2:
+华为的 MRS 需要更改 `hivemetastore-site.xml` 并重启 HMS 和 HiveServer2:
 
 ```
 <property>
@@ -322,11 +322,11 @@ CREATE CATALOG hive PROPERTIES (
 
 Doris 可以正确访问不同 Hive 版本中的 Hive Metastore。在默认情况下,Doris 会以 Hive 2.3 版本的兼容接口访问 
Hive Metastore。
 
-如在查询时遇到如 `Invalid method name: 'get_table_req'` 类似错误,说明 hive 版本不匹配。
+如在查询时遇到如 `Invalid method name: 'get_table_req'` 类似错误,说明 Hive 版本不匹配。
 
-你可以在创建 Catalog 时指定 hive 的版本。如访问 Hive 1.1.0 版本:
+你可以在创建 Catalog 时指定 Hive 的版本。如访问 Hive 1.1.0 版本:
 
-```sql 
+```sql
 CREATE CATALOG hive PROPERTIES (
     'type'='hms',
     'hive.metastore.uris' = 'thrift://172.0.0.1:9083',
@@ -357,15 +357,15 @@ CREATE CATALOG hive PROPERTIES (
 | `struct<col1: Type1, col2: Type2, ...>` | `struct<col1: Type1, col2: Type2, 
...>` | 支持嵌套,如 `struct<col1: array<int>, col2: map<int, date>>` |
 | other | unsupported | |
 
-> 注:是否按照 hive 表的 schema 来截断 char 或者 varchar 列
+> 注:是否按照 Hive 表的 Schema 来截断 `char` 或者 `varchar` 列
 
-> 如果会话变量 `truncate_char_or_varchar_columns` 开启,则当 hive 表的 schema 中 char 或者 
varchar 列的最大长度和底层 parquet 或者 orc 文件中的 schema 不一致时会按照 hive 表列的最大长度进行截断。
+> 如果会话变量 `truncate_char_or_varchar_columns` 开启,则当 Hive 表的 Schema 中 `char` 或者 
`varchar` 列的最大长度和底层 Parquet 或者 ORC 文件中的 `schema` 不一致时会按照 Hive 表列的最大长度进行截断。
 
-> 该变量默认为 false。
+> 该变量默认为 `false`。
 
 ## 使用 broker 访问 HMS
 
-创建 HMS Catalog 时增加如下配置,Hive 外表文件分片和文件扫描将会由名为 `test_broker` 的 broker 完成
+创建 HMS Catalog 时增加如下配置,Hive 外表文件分片和文件扫描将会由名为 `test_broker` 的 Broker 完成
 
 ```sql
 "broker.name" = "test_broker"
@@ -385,7 +385,7 @@ Doris 支持为指定的 External Hive Catalog 使用 Apache Ranger 进行鉴权
 
 目前支持 Ranger 的库、表、列的鉴权,暂不支持加密、行权限、Data Mask 等功能。
 
-如需使用 Apache Ranger 为整个 Doris 集群服务进行鉴权,请参阅 [Apache 
Ranger](../../admin-manual/auth/ranger.md).
+如需使用 Apache Ranger 为整个 Doris 集群服务进行鉴权,请参阅 [Apache 
Ranger](../../admin-manual/auth/ranger.md)
 
 ### 环境配置
 
@@ -393,20 +393,20 @@ Doris 支持为指定的 External Hive Catalog 使用 Apache Ranger 进行鉴权
 
 1. 创建 Catalog 时增加:
 
-       ```sql
-       "access_controller.properties.ranger.service.name" = "hive",
-       "access_controller.class" = 
"org.apache.doris.catalog.authorizer.ranger.hive.RangerHiveAccessControllerFactory",
-       ```
+ ```sql
+ "access_controller.properties.ranger.service.name" = "hive",
+ "access_controller.class" = 
"org.apache.doris.catalog.authorizer.ranger.hive.RangerHiveAccessControllerFactory",
+ ```
 
-       >注意:
-       >
-       > `access_controller.properties.ranger.service.name` 指的是 service 的类型,例如 
`hive`,`hdfs` 等。并不是配置文件中 `ranger.plugin.hive.service.name` 的值。
+ >注意:
+ >
+ > `access_controller.properties.ranger.service.name` 指的是 service 的类型,例如 
`hive`,`hdfs` 等。并不是配置文件中 `ranger.plugin.hive.service.name` 的值。
 
 2. 配置所有 FE 环境:
 
-    1. 将 HMS conf 目录下的配置文件 
ranger-hive-audit.xml,ranger-hive-security.xml,ranger-policymgr-ssl.xml 复制到 FE 
的 conf 目录下。
+    1. 将 HMS `conf` 目录下的配置文件 `ranger-hive-audit.xml`, 
`ranger-hive-security.xml`, `ranger-policymgr-ssl.xml` 复制到 FE 的 `conf` 目录下。
 
-    2. 修改 ranger-hive-security.xml 的属性,参考配置如下:
+    2. 修改 `ranger-hive-security.xml` 的属性,参考配置如下:
 
         ```sql
         <?xml version="1.0" encoding="UTF-8"?>
@@ -461,19 +461,19 @@ Doris 支持为指定的 External Hive Catalog 使用 Apache Ranger 进行鉴权
         </configuration>
         ```
 
-    3. 为获取到 Ranger 鉴权本身的日志,可在 `<doris_home>/conf` 目录下添加配置文件 log4j.properties。
+    3. 为获取到 Ranger 鉴权本身的日志,可在 `<doris_home>/conf` 目录下添加配置文件 `log4j.properties`。
 
     4. 重启 FE。
 
 ### 最佳实践
 
-1. 在 ranger 端创建用户 user1 并授权 db1.table1.col1 的查询权限
+1. 在 Ranger 端创建用户 user1 并授权 db1.table1.col1 的查询权限
 
-2. 在 ranger 端创建角色 role1 并授权 db1.table1.col2 的查询权限
+2. 在 Ranger 端创建角色 role1 并授权 db1.table1.col2 的查询权限
 
-3. 在 doris 创建同名用户 user1,user1 将直接拥有 db1.table1.col1 的查询权限
+3. 在 Doris 创建同名用户 user1,user1 将直接拥有 db1.table1.col1 的查询权限
 
-4. 在 doris 创建同名角色 role1,并将 role1 分配给 user1,user1 将同时拥有 db1.table1.col1 和 col2 
的查询权限
+4. 在 Doris 创建同名角色 role1,并将 role1 分配给 user1,user1 将同时拥有 db1.table1.col1 和 col2 
的查询权限
 
 5. Admin 和 Root 用户的权限不受 Apache Ranger 的权限控制
 
@@ -483,32 +483,32 @@ Doris 支持为指定的 External Hive Catalog 使用 Apache Ranger 进行鉴权
 
 ### 环境准备
 
-- `krb5.conf`
+* `krb5.conf`
 
-       `krb5.conf` 是 Kerberos 认证协议的配置文件。需将该文件部署在所有 FE 和 BE 节点上。并确保 Doris 
集群可以和文件中记录的 KDC 服务连通。
+ `krb5.conf` 是 Kerberos 认证协议的配置文件。需将该文件部署在所有 FE 和 BE 节点上。并确保 Doris 集群可以和文件中记录的 
KDC 服务连通。
 
-       默认情况下,该文件位于 Hadoop 集群的 `/etc` 目录下。但请联系 Hadoop 集群管理员获取正确的 `krb5.conf` 
文件,并将其部署到所有 FE 和 BE 节点的 `/etc` 目录下。
+ 默认情况下,该文件位于 Hadoop 集群的 `/etc` 目录下。但请联系 Hadoop 集群管理员获取正确的 `krb5.conf` 
文件,并将其部署到所有 FE 和 BE 节点的 `/etc` 目录下。
 
-       注意,某些情况下,`krb5.conf` 的文件位置可能取决于环境变量 `KRB5_CONFIG` 或 JVM 参数中的 
`-Djava.security.krb5.conf` 参数。请检查这些属性以确定 `krb5.conf` 的确切位置。
+ 注意,某些情况下,`krb5.conf` 的文件位置可能取决于环境变量 `KRB5_CONFIG` 或 JVM 参数中的 
`-Djava.security.krb5.conf` 参数。请检查这些属性以确定 `krb5.conf` 的确切位置。
 
-- JVM 参数
+* JVM 参数
 
-       请在 FE 和 BE 的 JVM 参数中添加如下配置(位于 fe.conf 和 be.conf 中):
+ 请在 FE 和 BE 的 JVM 参数中添加如下配置(位于 `fe.conf` 和 `be.conf` 中):
 
-       - `-Djavax.security.auth.useSubjectCredsOnly=false`
-       - `-Dsun.security.krb5.debug=true`
+  * `-Djavax.security.auth.useSubjectCredsOnly=false`
+  * `-Dsun.security.krb5.debug=true`
 
-       并重启 FE、BE 节点以确保其生效。
+ 并重启 FE、BE 节点以确保其生效。
 
 ### Catalog 配置
 
 通常情况下,连接 Kerberos 认证的 Hive 集群,需要在 Catalog 中添加如下属性:
 
-- `"hadoop.security.authentication" = "kerberos"`:开启 kerberos 认证方式。
--  `"hadoop.kerberos.principal" = "your_principal"`:HDFS namenode 的 
principal。通常是 `hdfs-site.xml` 的 `dfs.namenode.kerberos.principal` 配置。
--  `"hadoop.kerberos.keytab" = "/path/to/your_keytab"`:HDFS namenode 的 keytab 
文件。通常是 `hdfs-site.xml` 的 `dfs.namenode.keytab.file` 配置。注意,这个文件需要部署到所有 FE 和 BE 
节点相同的目录下(可自定义)。
-- `"yarn.resourcemanager.principal" = "your_principal"`:Yarn Resource Manager 
的 principal,可以在 `yarn-site.xml` 中获取。
-- `"hive.metastore.kerberos.principal" = "your_principal"`:Hive metastore 的 
principal。可以再 `hive-site.xml` 中。
+* `"hadoop.security.authentication" = "kerberos"`:开启 kerberos 认证方式。
+* `"hadoop.kerberos.principal" = "your_principal"`:HDFS namenode 的 
principal。通常是 `hdfs-site.xml` 的 `dfs.namenode.kerberos.principal` 配置。
+* `"hadoop.kerberos.keytab" = "/path/to/your_keytab"`:HDFS namenode 的 keytab 
文件。通常是 `hdfs-site.xml` 的 `dfs.namenode.keytab.file` 配置。注意,这个文件需要部署到所有 FE 和 BE 
节点相同的目录下(可自定义)。
+* `"yarn.resourcemanager.principal" = "your_principal"`:Yarn Resource Manager 
的 principal,可以在 `yarn-site.xml` 中获取。
+* `"hive.metastore.kerberos.principal" = "your_principal"`:Hive metastore 的 
principal。可以再 `hive-site.xml` 中。
 
 > 注:建议使用 `kinit -kt your_principal /path/to/your_keytab` 以及 `klist -k 
 > /path/to/your_keytab` 来
 
@@ -545,19 +545,96 @@ CREATE CATALOG hive_krb_ha PROPERTIES (
 );
 ```
 
+### 多 Kerberos 集群配置
+
+如需同时访问多个启用了 Kerberos 的 Hadoop 集群,需要修改 `krb5.conf` 文件并且配置 
`hadoop.security.auth_to_local` 属性,具体操作如下:
+
+1. 在 `krb5.conf` 文件配置 Realms
+
+    配置多集群时,需要把多个 Realm 配置到一个 `krb5.conf` 里头,`kdc` 和 `admin_server` 也可以是域名。
+
+    ``` properties
+    [realms]
+    REALM1.COM = {
+      kdc = 172.21.16.8:88
+      admin_server = 172.21.16.8
+    }
+    REALM2.COM = {
+      kdc = kdc_hostname:88
+      admin_server = kdc_hostname
+    }
+    ```
+
+2. 在 `krb5.conf` 文件配置 `domain_realm`,
+
+    查找 `kdc` 时使用 Principal 中的 `domain_name` 去找相对应的 Realm
+
+    ``` properties
+    [libdefaults]
+      dns_lookup_realm = true
+      dns_lookup_kdc = true
+    [domain_realm]
+      .your-host.example = REALM1.COM
+      your-host.example = REALM1.COM
+      .your-other-host.example = REALM2.COM
+      your-other-host.example = REALM2.COM
+    ```
+
+    如果未正确配置,通常会在 Doris 的 `log/be.out` 或者 `log/fe.out` 看到两种与 `domain_realm` 
有关的错误:
+   * Unable to locate KDC for realm / Cannot locate KDC
+   * No service creds
+
+3. 配置 Domain 到 Realm 的映射
+
+    为了在多集群环境下,能匹配到不同 Kerberos 服用用到的的 Principal,推荐 `core-site.xml` 添加或修改如下配置:
+
+    ```xml
+    <property>
+        <name>hadoop.security.auth_to_local</name>
+        <value>RULE:[1:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+               RULE:[2:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+               DEFAULT</value>
+    </property>
+    ```
+
+    如果需要在 Catalog 中单独生效,可以直接配置在 Properties 中:
+
+    ```sql
+    CREATE CATALOG hive_krb PROPERTIES (
+        'type'='hms',
+        'hive.metastore.uris' = 'thrift://172.0.0.1:9083',
+        'hive.metastore.sasl.enabled' = 'true',
+        'hive.metastore.kerberos.principal' = 'your-other-hms-principal',
+        'hadoop.security.authentication' = 'kerberos',
+        'hadoop.kerberos.keytab' = 
'/your-other-keytab-filepath/your-other.keytab',   
+        'hadoop.kerberos.principal' = 'your-other-princi...@your.com',
+        'yarn.resourcemanager.principal' = 'your-other-rm-principal',
+        'hadoop.security.auth_to_local' = 
'RULE:[1:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+                                       RULE:[2:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+                                       DEFAULT'
+    );
+    ```
+
+4. 重启 Doris 服务
+
+    检验映射规则是否能正确匹配,只要看访问不同集群时是否出现错误:`NoMatchingRule: No rules applied to 
user/domain_n...@realm.com`
+
 ### 问题排查
 
 如遇 Kerberos 认证问题,在设置了 JVM 参数 `-Dsun.security.krb5.debug=true` 后,会在 `fe.out` 或 
`be.out` 中打印 Kerberos 认证相关信息。可以参考 [FAQ](../../faq/lakehouse-faq) 中的相关错误进行排查。
 
 ## Hive Transactional 表
-Hive transactional 表是 Hive 中支持 ACID 
语义的表。详情可见:https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions
 
-### Hive Transactional 表支持情况:
+Hive Transactional 表是 Hive 中支持 ACID 语义的表。详情可见 [Hive 
Transactions](https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions)。
+
+### Hive Transactional 表支持情况
+
 |表类型 | 在 Hive 中支持的操作|Hive 表属性 | 支持的 Hive 版本|
 |---|---|---|---|
-|Full-ACID Transactional Table |支持 Insert, Update, Delete 
操作|'transactional'='true', 'transactional_properties'='insert_only'|3.x,2.x,其中 
2.x 需要在 Hive 中执行完 major compaction 才可以加载|
+|Full-ACID Transactional Table |支持 Insert, Update, Delete 
操作|'transactional'='true', 'transactional_properties'='insert_only'|3.x,2.x,其中 
2.x 需要在 Hive 中执行完 Major Compaction 才可以加载|
 |Insert-Only Transactional Table|只支持 Insert 操作|'transactional'='true'|3.x,2.x|
 
-### 当前限制:
+### 当前限制
+
 目前不支持 Original Files 的场景。
-当一个表转换成 Transactional 表之后,后续新写的数据文件会使用 Hive Transactional 表的 
schema,但是已经存在的数据文件是不会转化成 Transactional 表的 schema,这样的文件称为 Original Files。
+当一个表转换成 Transactional 表之后,后续新写的数据文件会使用 Hive Transactional 表的 
Schema,但是已经存在的数据文件是不会转化成 Transactional 表的 Schema,这样的文件称为 Original Files。
diff --git a/versioned_docs/version-2.1/lakehouse/datalake-analytics/hive.md 
b/versioned_docs/version-2.1/lakehouse/datalake-analytics/hive.md
index ab0830d830..00b276b7a9 100644
--- a/versioned_docs/version-2.1/lakehouse/datalake-analytics/hive.md
+++ b/versioned_docs/version-2.1/lakehouse/datalake-analytics/hive.md
@@ -89,7 +89,7 @@ CREATE CATALOG hive PROPERTIES (
 
 ViewFs related parameters can be added to the catalog configuration as above, 
or added to `conf/core-site.xml`.
 
-How ViewFs works and parameter configuration, please refer to relevant hadoop 
documents, for example, 
https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/ViewFs.html
+How ViewFs works and parameter configuration, please refer to relevant hadoop 
documents, for example, 
<https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/ViewFs.html>
 
 ### Hive On JuiceFS
 
@@ -285,8 +285,8 @@ Currently, Doris only supports automatic update of metadata 
in Hive Metastore (H
 
 The automatic update feature involves the following parameters in fe.conf:
 
-1. `enable_hms_events_incremental_sync`: This specifies whether to enable 
automatic incremental synchronization for metadata, which is disabled by 
default. 
-2. `hms_events_polling_interval_ms`: This specifies the interval between two 
readings, which is set to 10000 by default. (Unit: millisecond) 
+1. `enable_hms_events_incremental_sync`: This specifies whether to enable 
automatic incremental synchronization for metadata, which is disabled by 
default.
+2. `hms_events_polling_interval_ms`: This specifies the interval between two 
readings, which is set to 10000 by default. (Unit: millisecond)
 3. `hms_events_batch_size_per_rpc`: This specifies the maximum number of 
events that are read at a time, which is set to 500 by default.
 
 To enable automatic update(Excluding Huawei MRS), you need to modify the 
hive-site.xml of HMS and then restart HMS and HiveServer2:
@@ -344,7 +344,7 @@ If you meet error message like `Invalid method name: 
'get_table_req'`, which mea
 
 You can specify the hive version when creating the Catalog. If accessing Hive 
1.1.0 version:
 
-```sql 
+```sql
 CREATE CATALOG hive PROPERTIES (
     'type'='hms',
     'hive.metastore.uris' = 'thrift://172.0.0.1:9083',
@@ -389,7 +389,6 @@ Add following setting when creating an HMS catalog, file 
splitting and scanning
 "broker.name" = "test_broker"
 ```
 
-
 Doris has implemented Broker query support for HMS Catalog Iceberg based on 
the Iceberg `FileIO` interface. If needed, the following configuration can be 
added when creating the HMS Catalog.
 
 ```sql
@@ -412,14 +411,14 @@ To connect to the Hive Metastore with Ranger permission 
verification enabled, yo
 
 1. When creating a Catalog, add:
 
-       ```sql
-       "access_controller.properties.ranger.service.name" = "hive",
-       "access_controller.class" = 
"org.apache.doris.catalog.authorizer.ranger.hive.RangerHiveAccessControllerFactory",
-       ```
+ ```sql
+ "access_controller.properties.ranger.service.name" = "hive",
+ "access_controller.class" = 
"org.apache.doris.catalog.authorizer.ranger.hive.RangerHiveAccessControllerFactory",
+ ```
 
-       > Note:
-       >
-       > `access_controller.properties.ranger.service.name` refers to the type 
of service, such as `hive`, `hdfs`, etc. It is not the value of 
`ranger.plugin.hive.service.name` in the configuration file.
+ > Note:
+ >
+ > `access_controller.properties.ranger.service.name` refers to the type of 
service, such as `hive`, `hdfs`, etc. It is not the value of 
`ranger.plugin.hive.service.name` in the configuration file.
 
 2. Configure all FE environments:
 
@@ -502,32 +501,32 @@ This section mainly introduces how to connect to a Hive + 
HDFS cluster with Kerb
 
 ### Environment preparation
 
-- `krb5.conf`
+* `krb5.conf`
 
-       `krb5.conf` is the configuration file for the Kerberos authentication 
protocol. This file needs to be deployed on all FE and BE nodes. And ensure 
that the Doris cluster can connect to the KDC service recorded in this file.
+ `krb5.conf` is the configuration file for the Kerberos authentication 
protocol. This file needs to be deployed on all FE and BE nodes. And ensure 
that the Doris cluster can connect to the KDC service recorded in this file.
 
-       By default, this file is located in the `/etc` directory of the Hadoop 
cluster. But please contact the Hadoop cluster administrator to obtain the 
correct `krb5.conf` file and deploy it to the `/etc` directory of all FE and BE 
nodes.
+ By default, this file is located in the `/etc` directory of the Hadoop 
cluster. But please contact the Hadoop cluster administrator to obtain the 
correct `krb5.conf` file and deploy it to the `/etc` directory of all FE and BE 
nodes.
 
-       Note that in some cases the file location of `krb5.conf` may depend on 
the environment variable `KRB5_CONFIG` or the `-Djava.security.krb5.conf` in 
the JVM parameters. Please check these properties to determine the exact 
location of `krb5.conf`.
+ Note that in some cases the file location of `krb5.conf` may depend on the 
environment variable `KRB5_CONFIG` or the `-Djava.security.krb5.conf` in the 
JVM parameters. Please check these properties to determine the exact location 
of `krb5.conf`.
 
-- JVM parameters
+* JVM parameters
 
-       Please add the following options to the JVM of FE and BE (located in 
`fe.conf` and `be.conf`):
+ Please add the following options to the JVM of FE and BE (located in 
`fe.conf` and `be.conf`):
 
-       - `-Djavax.security.auth.useSubjectCredsOnly=false`
-       - `-Dsun.security.krb5.debug=true`
+       * `-Djavax.security.auth.useSubjectCredsOnly=false`
+       * `-Dsun.security.krb5.debug=true`
 
-       And restart the FE and BE nodes to ensure it takes effect.
+ And restart the FE and BE nodes to ensure it takes effect.
 
 ### Catalog configuration
 
 Normally, to connect to a Kerberos enabled Hive cluster, you need to add the 
following attributes to the Catalog:
 
-- `"hadoop.security.authentication" = "kerberos"`: Enable kerberos 
authentication method.
-- `"hadoop.kerberos.principal" = "your_principal"`: The principal of the HDFS 
namenode. Typically the `dfs.namenode.kerberos.principal` configuration of 
`hdfs-site.xml`.
-- `"hadoop.kerberos.keytab" = "/path/to/your_keytab"`: keytab file of HDFS 
namenode. Typically the `dfs.namenode.keytab.file` configuration of 
`hdfs-site.xml`. Note that this file needs to be deployed to the same directory 
of all FE and BE nodes (can be customized).
-- `"yarn.resourcemanager.principal" = "your_principal"`: The principal of Yarn 
Resource Manager, which can be found in `yarn-site.xml`.
-- `"hive.metastore.kerberos.principal" = "your_principal"`: The principal of 
the Hive metastore. Can be found in `hive-site.xml`.
+* `"hadoop.security.authentication" = "kerberos"`: Enable kerberos 
authentication method.
+* `"hadoop.kerberos.principal" = "your_principal"`: The principal of the HDFS 
namenode. Typically the `dfs.namenode.kerberos.principal` configuration of 
`hdfs-site.xml`.
+* `"hadoop.kerberos.keytab" = "/path/to/your_keytab"`: keytab file of HDFS 
namenode. Typically the `dfs.namenode.keytab.file` configuration of 
`hdfs-site.xml`. Note that this file needs to be deployed to the same directory 
of all FE and BE nodes (can be customized).
+* `"yarn.resourcemanager.principal" = "your_principal"`: The principal of Yarn 
Resource Manager, which can be found in `yarn-site.xml`.
+* `"hive.metastore.kerberos.principal" = "your_principal"`: The principal of 
the Hive metastore. Can be found in `hive-site.xml`.
 
 > Note: Suggest to use `kinit -kt your_principal /path/to/your_keytab` 以及 
 > `klist -k /path/to/your_keytab` to get the ticket or check its validation.
 
@@ -564,6 +563,80 @@ CREATE CATALOG hive_krb_ha PROPERTIES (
 );
 ```
 
+### Multi-Kerberos Cluster Configuration
+
+To access multiple Kerberos-enabled Hadoop clusters simultaneously, you need 
to modify the `krb5.conf` file and configure the 
`hadoop.security.auth_to_local` property. The detailed steps are as follows:
+
+1. Configure Realms in the krb5.conf File
+
+   When configuring multiple clusters, you need to include multiple realms in 
a single `krb5.conf` file. The KDC and admin_server can also be domain names.
+
+    ``` properties
+    [realms]
+    REALM1.COM = {
+      kdc = 172.21.16.8:88
+      admin_server = 172.21.16.8
+    }
+    REALM2.COM = {
+      kdc = kdc_hostname:88
+      admin_server = kdc_hostname
+    }
+    ```
+
+2. Configure domain_realm in the krb5.conf File
+
+   To locate the KDC, use the domain_name in the principal to find the 
corresponding realm.
+
+    ``` properties
+    [libdefaults]
+      dns_lookup_realm = true
+      dns_lookup_kdc = true
+    [domain_realm]
+      .your-host.example = REALM1.COM
+      your-host.example = REALM1.COM
+      .your-other-host.example = REALM2.COM
+      your-other-host.example = REALM2.COM
+    ```
+
+   If not configured correctly, you may see domain_realm-related errors in the 
`log/be.out` or `log/fe.out` of Doris, such as:
+    * Unable to locate KDC for realm / Cannot locate KDC
+    * No service creds
+
+3. Configure Domain-to-Realm Mapping
+
+   To match principals used by different Kerberos services in a multi-cluster 
environment, it's recommended to add or modify the following configuration in 
`core-site.xml`:
+
+    ```xml
+    <property>
+        <name>hadoop.security.auth_to_local</name>
+        <value>RULE:[1:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+               RULE:[2:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+               DEFAULT</value>
+    </property>
+    ```
+
+   If it needs to take effect individually in the Catalog, it can be directly 
configured in the properties:
+
+    ```sql
+    CREATE CATALOG hive_krb PROPERTIES (
+        'type'='hms',
+        'hive.metastore.uris' = 'thrift://172.0.0.1:9083',
+        'hive.metastore.sasl.enabled' = 'true',
+        'hive.metastore.kerberos.principal' = 'your-other-hms-principal',
+        'hadoop.security.authentication' = 'kerberos',
+        'hadoop.kerberos.keytab' = 
'/your-other-keytab-filepath/your-other.keytab',   
+        'hadoop.kerberos.principal' = 'your-other-princi...@your.com',
+        'yarn.resourcemanager.principal' = 'your-other-rm-principal',
+        'hadoop.security.auth_to_local' = 
'RULE:[1:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+                                       RULE:[2:$1@$0](^.*@.*$)s/^(.*)@.*$/$1/g
+                                       DEFAULT'
+    );
+    ```
+
+4. Restart Doris Service
+
+    To verify whether the mapping rules match correctly, check if there are 
any errors such as `NoMatchingRule: No rules applied to 
user/domain_n...@realm.com` when accessing different clusters.
+
 ### Troubleshooting
 
 In case of Kerberos authentication problems, after setting the JVM parameter 
`-Dsun.security.krb5.debug=true`, Kerberos authentication related information 
will be printed in `fe.out` or `be.out`. You can refer to the related errors in 
[FAQ](../../faq/lakehouse-faq) for troubleshooting.
@@ -572,13 +645,14 @@ In case of Kerberos authentication problems, after 
setting the JVM parameter `-D
 
 Hive transactional tables are tables in Hive that support ACID (Atomicity, 
Consistency, Isolation, Durability) semantics. For more details, you can refer 
to: [Hive 
Transactions](https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions).
 
-### Supported Operations for Hive Transactional Tables:
+### Supported Operations for Hive Transactional Tables
+
 |Transactional Table Type|Supported Operations in Hive|Hive Table 
Properties|Supported Hive Versions|
 |---|---|---|---|
 |Full-ACID Transactional Table |Supports insert, update, delete 
operations|'transactional'='true', 
'transactional_properties'='insert_only'|3.x, 2.x (requires major compaction in 
Hive before loading)|
 |Insert-Only Transactional Table|Supports only Insert 
operations|'transactional'='true'|3.x, 2.x|
 
-### Current Limitations:
+### Current Limitations
+
 Currently, it does not support scenarios involving Original Files.
 When a table is transformed into a transactional table, subsequent newly 
written data files will use the schema of the Hive transactional table. 
However, existing data files will not be converted to the schema of the 
transactional table. These existing files are referred to as Original Files.
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to