[fix](catalog) fix create catalog with resource replay issue and kerberos auth issue (#20137)
1. Fix create catalog with resource replay bug. If user create catalog using `create catalog hive with resource xxx`, when replaying edit log, there is a bug that resource may be dropped, causing NPE and FE will fail to start. In this PR, I add a new FE config `disallow_create_catalog_with_resource`, default is true. So that `with resource` will not be allowed, and it will be deprecated later. And also fix the replay bug to avoid NPE. 2. Fix issue when creating 2 hive catalogs to connect with and without kerberos authentication. When user create 2 hive catalogs, one use simple auth, the other use kerberos auth. The query may fail with error like: `Server asks us to fall back to SIMPLE auth, but this client is configured to only allow secure connections.` So I add a default property for hive catalog: `"ipc.client.fallback-to-simple-auth-allowed" = "true"`. Which means this property will be added automatically when user creating hive catalog, to avoid such problem. 3. Fix calling `hdfsExists()` issue When calling `hdfsExists()` with non-zero return code, should check if it encounters error or is file not found. 3. Some code refactor Avoid import `org.apache.parquet.Strings`
This commit is contained in:
@ -1997,4 +1997,8 @@ public class Config extends ConfigBase {
|
||||
@ConfField
|
||||
public static int analyze_task_timeout_in_minutes = 120;
|
||||
|
||||
@ConfField(mutable = true, masterOnly = true, description = {
|
||||
"是否禁止使用 WITH REOSOURCE 语句创建 Catalog。",
|
||||
"Whether to disable creating catalog with WITH RESOURCE statement."})
|
||||
public static boolean disallow_create_catalog_with_resource = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user