mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 20:22:12 +08:00
120 lines
4.7 KiB
YAML
120 lines
4.7 KiB
YAML
server:
|
||
port: 80 # 服务端口
|
||
tomcat:
|
||
accept-count: 1000
|
||
max-connections: 10000
|
||
|
||
spring:
|
||
application:
|
||
name: know-streaming
|
||
profiles:
|
||
active: dev
|
||
main:
|
||
allow-bean-definition-overriding: true
|
||
jackson:
|
||
time-zone: GMT+8
|
||
datasource:
|
||
know-streaming: # know-streaming 自身数据库的配置
|
||
jdbc-url: jdbc:mariadb://SERVER_MYSQL_ADDRESS/SERVER_MYSQL_DB?useUnicode=true&characterEncoding=utf8&jdbcCompliantTruncation=true&allowMultiQueries=true&useSSL=false&alwaysAutoGeneratedKeys=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||
username: SERVER_MYSQL_USER
|
||
password: SERVER_MYSQL_PASSWORD
|
||
driver-class-name: org.mariadb.jdbc.Driver
|
||
maximum-pool-size: 20
|
||
idle-timeout: 30000
|
||
connection-test-query: SELECT 1
|
||
logi-job: # know-streaming 依赖的 logi-job 模块的数据库的配置,默认与 know-streaming 的数据库配置保持一致即可
|
||
enable: true
|
||
jdbc-url: jdbc:mariadb://SERVER_MYSQL_ADDRESS/SERVER_MYSQL_DB?useUnicode=true&characterEncoding=utf8&jdbcCompliantTruncation=true&allowMultiQueries=true&useSSL=false&alwaysAutoGeneratedKeys=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||
username: SERVER_MYSQL_USER
|
||
password: SERVER_MYSQL_PASSWORD
|
||
driver-class-name: org.mariadb.jdbc.Driver
|
||
max-lifetime: 60000
|
||
init-sql: true
|
||
init-thread-num: 20
|
||
max-thread-num: 50
|
||
log-expire: 3 # 日志保存天数,以天为单位
|
||
app-name: know-streaming
|
||
claim-strategy: com.didiglobal.logi.job.core.consensual.RandomConsensual
|
||
logi-security: # know-streaming 依赖的 logi-security 模块的数据库的配置,默认与 know-streaming 的数据库配置保持一致即可
|
||
jdbc-url: jdbc:mariadb://SERVER_MYSQL_ADDRESS/SERVER_MYSQL_DB?useUnicode=true&characterEncoding=utf8&jdbcCompliantTruncation=true&allowMultiQueries=true&useSSL=false&alwaysAutoGeneratedKeys=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||
username: SERVER_MYSQL_USER
|
||
password: SERVER_MYSQL_PASSWORD
|
||
driver-class-name: org.mariadb.jdbc.Driver
|
||
app-name: know-streaming
|
||
resource-extend-bean-name: myResourceExtendImpl
|
||
login-extend-bean-name: logiSecurityDefaultLoginExtendImpl
|
||
|
||
logging:
|
||
config: classpath:logback-spring.xml
|
||
|
||
# 线程池大小相关配置
|
||
thread-pool:
|
||
scheduled:
|
||
thread-num: 2 # @Scheduled任务的线程池大小,默认是一个
|
||
|
||
collector: # 采集模块的配置
|
||
future-util: # 采集模块线程池配置
|
||
num: 3 # 线程池个数
|
||
thread-num: 64 # 每个线程池核心线程数
|
||
queue-size: 10000 # 每个线程池队列大小
|
||
select-suitable-enable: true # 任务是否自动选择合适的线程池,非主要,可不修改
|
||
suitable-queue-size: 1000 # 线程池理想的队列大小,非主要,可不修改
|
||
|
||
task: # 任务模块的配置
|
||
metrics: # metrics采集任务配置
|
||
thread-num: 18 # metrics采集任务线程池核心线程数
|
||
queue-size: 180 # metrics采集任务线程池队列大小
|
||
metadata: # metadata同步任务配置
|
||
thread-num: 27 # metadata同步任务线程池核心线程数
|
||
queue-size: 270 # metadata同步任务线程池队列大小
|
||
common: # 剩余其他任务配置
|
||
thread-num: 15 # 剩余其他任务线程池核心线程数
|
||
queue-size: 150 # 剩余其他任务线程池队列大小
|
||
es:
|
||
search: # es查询线程池
|
||
thread-num: 20 # 线程池大小
|
||
queue-size: 10000 # 队列大小
|
||
|
||
|
||
|
||
# 客户端池大小相关配置
|
||
client-pool:
|
||
kafka-consumer:
|
||
min-idle-client-num: 2 # 最小空闲客户端数
|
||
max-idle-client-num: 20 # 最大空闲客户端数
|
||
max-total-client-num: 20 # 最大客户端数
|
||
borrow-timeout-unit-ms: 5000 # 租借超时时间,单位秒
|
||
kafka-admin:
|
||
client-cnt: 1 # 每个Kafka集群创建的KafkaAdminClient数
|
||
|
||
|
||
|
||
# ES客户端配置
|
||
es:
|
||
client:
|
||
address: SERVER_ES_ADDRESS
|
||
client-cnt: 10
|
||
io-thread-cnt: 2
|
||
max-retry-cnt: 5
|
||
index:
|
||
expire: 15 # 索引过期天数,15表示超过15天的索引会被KS过期删除
|
||
|
||
|
||
# 普罗米修斯指标导出相关配置
|
||
management:
|
||
endpoints:
|
||
web:
|
||
base-path: /metrics
|
||
exposure:
|
||
include: '*'
|
||
health:
|
||
elasticsearch:
|
||
enabled: false
|
||
metrics:
|
||
export:
|
||
prometheus:
|
||
descriptions: true
|
||
enabled: true
|
||
tags:
|
||
application: know-streaming
|