Конфигурация FE
Параметры FE делятся на динамические и статические.
-
Динамические параметры можно настраивать и изменять с помощью SQL-команд, что очень удобно. Однако эти настройки становятся недействительными при перезапуске FE. Поэтому мы рекомендуем также изменять параметры конфигурации в файле fe.conf, чтобы предотвратить потерю изменений.
-
Статические параметры можно настраивать и изменять только в конфигурационном файле FE fe.conf. После изменения этого файла необходимо перезапустить FE, чтобы изменения вступили в силу.
Является ли параметр динамическим, указано в столбце IsMutable в выводе ADMIN SHOW CONFIG. TRUE означает динамический параметр.
Обратите внимание, что как динамические, так и статические параметры FE можно настраивать в файл е fe.conf.
Просмотр параметров конфигурации FE
После запуска FE вы можете выполнить команду ADMIN SHOW FRONTEND CONFIG в вашем MySQL-клиенте для проверки конфигурации параметров. Если вы хотите запросить конфигурацию конкретного параметра, выполните следующую команду:
ADMIN SHOW FRONTEND CONFIG [LIKE "pattern"];
Для подробного описания возвращаемых полей см. ADMIN SHOW CONFIG.
У вас должны быть права администратора для выполнения команд, связанных с администрированием cluster.
Настройка параметров FE
Настройка динамических параметров FE
Вы можете настроить или изменит ь настройки динамических параметров FE с помощью ADMIN SET FRONTEND CONFIG.
ADMIN SET FRONTEND CONFIG ("key" = "value");
Изменения конфигурации, сделанные с помощью ADMIN SET FRONTEND, будут сброшены к значениям по умолчанию из файла fe.conf после перезапуска FE. Поэтому мы рекомендуем также изменить параметры конфигурации в fe.conf, если вы хотите сделать изменения постоянными.
Настройка статических параметров FE
Статические параметры FE задаются путём их изменения в конфигурационном файле fe.conf и перезапуска FE для вступления изменений в силу.
Описание параметров FE
Logging
log_roll_size_mb
- Default: 1024
- Type: Int
- Unit: MB
- Is mutable: No
- Description: Максимум size of a system файл лога or an audit файл лога.
- Introduced in: -
sys_log_dir
- Default: SelenaFE.SELENA_HOME_DIR + "/log"
- Type: String
- Unit: -
- Is mutable: No
- Description: Директория которая хранит system файл логаs.
- Introduced in: -
sys_log_level
- Default: INFO
- Type: String
- Unit: -
- Is mutable: No
- Description: The severity levels into which system записей лога are classified. Допустимые значения:
INFO,WARN,ERROR, andFATAL. - Introduced in: -
sys_log_roll_num
- Default: 10
- Type: Int
- Unit: -
- Is mutable: No
- Description: Максимальное количество system файл логаs that может сохраняться within каждый период хранения указанного параметром the
sys_log_roll_intervalparameter. - Introduced in: -
sys_log_verbose_modules
- Default: Empty string
- Type: String[]
- Unit: -
- Is mutable: No
- Description: The modules for which Selena генерирует системный логs. Если этот параметр установлен в
org.apache.selena.catalog, Selena генерирует системный логs only for the catalog module. Разделите the имена модулей запятой (,) и пробелом. - Introduced in: -
sys_log_roll_interval
- Default: DAY
- Type: String
- Unit: -
- Is mutable: No
- Description: Интервал времени с которым Selena ротирует system записей лога. Допустимые значения:
DAYandHOUR.- Если этот параметр установлен в
DAY, суффикс в форматеyyyyMMddдобавляется к именам of system файл логаs. - Если этот параметр установлен в
HOUR, суффикс в форматеyyyyMMddHHдобавляется к именам of system файл логаs.
- Если этот параметр установлен в
- Introduced in: -
sys_log_delete_age
- Default: 7d
- Type: String
- Unit: -
- Is mutable: No
- Description: The период хранения of system файл логаs. The default value
7dуказывает, что каждый system файл лога может сохраняться for 7 days. Selena проверяет каждый system файл лога and удаляет те которые были сгенерированы 7 дней назад. - Introduced in: -
audit_log_dir
- Default: SelenaFE.SELENA_HOME_DIR + "/log"
- Type: String
- Unit: -
- Is mutable: No
- Description: Директория которая хранит audit файл логаs.
- Introduced in: -
audit_log_roll_num
- Default: 90
- Type: Int
- Unit: -
- Is mutable: No
- Description: Максимальное количество audit файл логаs that может сохраняться within каждый период хранения указанного параметром the
audit_log_roll_intervalparameter. - Introduced in: -
audit_log_modules
- Default: slow_query, query
- Type: String[]
- Unit: -
- Is mutable: No
- Description: The modules for which Selena генерирует audit записей лога. По умолчанию, Selena генерирует лог аудитаs for the
slow_querymodule and thequerymodule. Theconnectionmodule поддерживается начиная с версии v1.5.2. Разделите the имена модулей запятой (,) и пробелом. - Introduced in: -
qe_slow_log_ms
- Default: 5000
- Type: Long
- Unit: Milliseconds
- Is mutable: Yes
- Description: Порог используется для determine whether a query is a медленный запрос. If the время ответа of a query exceeds этот порог, it записывается как a медленный запрос in fe.audit.log.
- Introduced in: -
audit_log_roll_interval
- Default: DAY
- Type: String
- Unit: -
- Is mutable: No
- Description: Интервал времени с которым Selena ротирует audit записей лога. Допустимые значения:
DAYandHOUR.- Если этот параметр установлен в
DAY, суффикс в форматеyyyyMMddдобавляется к именам of audit файл логаs. - Если этот параметр установлен в
HOUR, суффикс в форматеyyyyMMddHHдобавляется к именам of audit файл логаs.
- Если этот параметр установлен в
- Introduced in: -
audit_log_delete_age
- Default: 30d
- Type: String
- Unit: -
- Is mutable: No
- Description: The период хранения of audit файл логаs. The default value
30dуказывает, что каждый audit файл лога может сохраняться for 30 days. Selena проверяет каждый audit файл лога and удаляет те которые были сгенерированы 30 дней назад. - Introduced in: -
dump_log_dir
- Default: SelenaFE.SELENA_HOME_DIR + "/log"
- Type: String
- Unit: -
- Is mutable: No
- Description: Директория которая хранит dump файл логаs.
- Introduced in: -
dump_log_roll_num
- Default: 10
- Type: Int
- Unit: -
- Is mutable: No
- Description: Максимальное количество dump файл логаs that может сохраняться within каждый период хранения указанного параметром the
dump_log_roll_intervalparameter. - Introduced in: -
dump_log_modules
- Default: query
- Type: String[]
- Unit: -
- Is mutable: No
- Description: The modules for which Selena генерирует dump записей лога. По умолчанию, Selena генерирует лог дампаs for the query module. Разделите the имена модулей запятой (,) и пробелом.
- Introduced in: -
dump_log_roll_interval
- Default: DAY
- Type: String
- Unit: -
- Is mutable: No
- Description: Интервал времени с которым Selena ротирует dump записей лога. Допустимые значения:
DAYandHOUR.- Если этот параметр установлен в
DAY, суффикс в форматеyyyyMMddдобавляется к именам of dump файл логаs. - Если этот параметр установлен в
HOUR, суффикс в форматеyyyyMMddHHдобавляется к именам of dump файл логаs.
- Если этот параметр установлен в
- Introduced in: -
dump_log_delete_age
- Default: 7d
- Type: String
- Unit: -
- Is mutable: No
- Description: The период хранения of dump файл логаs. The default value
7dуказывает, что каждый dump файл лога может сохраняться for 7 days. Selena проверяет каждый dump файл лога and удаляет те которые были сгенерированы 7 дней назад. - Introduced in: -
log_cleaner_disk_util_based_enable
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: Enable automatic log cleaning based on disk usage. When enabled, logs будет cleaned when disk usage exceeds the threshold. The log cleaner runs as a background daemon on the узел FE and helps prevent disk space exhaustion from файл лога accumulation.
- Introduced in: -
log_cleaner_disk_usage_threshold
- Default: 80
- Type: Int
- Unit: Percentage
- Is mutable: Yes
- Description: Disk usage threshold (наcentage) to trigger log cleaning. When disk usage exceeds этот порог, log cleaning will start. The cleaner проверяет каждый configured log directory independently and обрабатывает directories that exceed этот порог.
- Introduced in: -
log_cleaner_disk_usage_target
- Default: 60
- Type: Int
- Unit: Percentage
- Is mutable: Yes
- Description: Target disk usage (наcentage) after log cleaning. Log cleaning will continue until disk usage drops below этот порог. The cleaner deletes the oldest файл логаs one by one until the target is rкаждыйed.
- Introduced in: -
log_cleaner_audit_log_min_retention_days
- Default: 3
- Type: Int
- Unit: Days
- Is mutable: Yes
- Description: Minimum retention days for audit файл логаs. Audit файл логаs newer than this will not be deleted even if disk usage is high. This гарантирует, что лог аудитаs are preserved for compliance and troubleshooting purposes.
- Introduced in: -
log_cleaner_check_interval_second
- Default: 300
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: Interval в секундах для проверки disk usage and clean logs. The cleaner наiodicвсеy проверяет каждый log directory's disk usage and triggers cleaning when necessary. Default is 300 seconds (5 minutes).
- Introduced in: -
Server
frontend_address
- Default: 0.0.0.0
- Type: String
- Unit: -
- Is mutable: No
- Description: The IP address of the узел FE.
- Introduced in: -
dns_cache_ttl_seconds
- Default: 60
- Type: Int
- Unit: Seconds
- Is mutable: No
- Description: DNS cache TTL (Time-To-Live) в секундах for successful DNS lookups. This sets the Java security proнаty
networkaddress.cache.ttlwhich controls how long the JVM caches successful DNS lookups. Set to -1 to cache forever, or 0 чтобы отключить caching. This is particularly useful in environments where IP addresses change frequently, such as Kubernetes deployments or when using dynamic DNS. This is a static configuration and requires FE restart to take effect. - Introduced in: v1.5.2, v2.0.0
priority_networks
- Default: Empty string
- Type: String
- Unit: -
- Is mutable: No
- Description: Declares a selection strategy for servers that иметь multiple IP addresses. Note that at most one IP address must match the list указанного параметром this parameter. The value of this parameter is a list that consists of entries, which are separated with semicolons (;) in CIDR notation, such as 10.10.10.0/24. If no IP address matches the entries in this list, an available IP address of the server будет randomly selected. From v1.5.2, Selena supports deployment based on IPv6. If the server имеет both IPv4 and IPv6 addresses, and this parameter is not specified, the system uses an IPv4 address по умолчанию. You can change this behavior by настройка
net_use_ipv6_when_priority_networks_emptytotrue. - Introduced in: -
net_use_ipv6_when_priority_networks_empty
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: A boolean value чтобы управлять whether to use IPv6 addresses preferentiвсеy when
priority_networksis not specified.trueозначает to всеow the system to use an IPv6 address preferentiвсеy when the server that hosts the node имеет both IPv4 and IPv6 addresses andpriority_networksis not specified. - Introduced in: v1.5.2
http_port
- Default: 8030
- Type: Int
- Unit: -
- Is mutable: No
- Description: The port on which the HTTP server in the узел FE listens.
- Introduced in: -
http_worker_threads_num
- Default: 0
- Type: Int
- Unit: -
- Is mutable: No
- Description: Number of worker threads for http server to deal with http requests. For a negative or 0 value, the number of threads будет twice the number of cpu cores.
- Introduced in: v1.5.2
http_backlog_num
- Default: 1024
- Type: Int
- Unit: -
- Is mutable: No
- Description: The length of the backlog queue held by the HTTP server in the узел FE.
- Introduced in: -
enable_http_async_handler
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: Определяет, всеow the system to process HTTP-запросs asynchronously. If this feature включён, an HTTP-запрос received by Netty worker threads will then be submitted to a separate thread pool for service logic handling to avoid blocking the HTTP server. If disabled, Netty workers will handle the service logic.
- Introduced in: 4.0.0
enable_https
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: Определяет, enable HTTPS server alongside HTTP server in узел FEs.
- Introduced in: v2.0.0
https_port
- Default: 8443
- Type: Int
- Unit: -
- Is mutable: No
- Description: The port on which the HTTPS server in the узел FE listens.
- Introduced in: v2.0.0
http_async_threads_num
- Default: 4096
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: Size of the thread pool for asynchronous HTTP-запрос processing. The alias is
max_http_sql_service_task_threads_num. - Introduced in: 4.0.0
cluster_name
- Default: Selena Cluster
- Type: String
- Unit: -
- Is mutable: No
- Description: The name of the Selena cluster to which the FE belongs. The cluster name is displayed for
Titleon the web page. - Introduced in: -
rpc_port
- Default: 9020
- Type: Int
- Unit: -
- Is mutable: No
- Description: The port on which the Thrift server in the узел FE listens.
- Introduced in: -
thrift_server_max_worker_threads
- Default: 4096
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: Максимальное количество worker threads that поддерживаются by the Thrift server in the узел FE.
- Introduced in: -
thrift_server_queue_size
- Default: 4096
- Type: Int
- Unit: -
- Is mutable: No
- Description: The length of queue where requests are ожидающий. If the number of threads that are being processed in the thrift server exceeds the value specified in
thrift_server_max_worker_threads, new requests are added to the ожидающий queue. - Introduced in: -
thrift_client_timeout_ms
- Default: 5000
- Type: Int
- Unit: Milliseconds
- Is mutable: No
- Description: The length of time after which idle client connections time out.
- Introduced in: -