mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit
This commit is contained in:
134
orange-demo-service/zz-resource/config-data/application-dev.yaml
Normal file
134
orange-demo-service/zz-resource/config-data/application-dev.yaml
Normal file
@@ -0,0 +1,134 @@
|
||||
server:
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
max-threads: 100
|
||||
min-spare-threads: 10
|
||||
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 50MB
|
||||
max-request-size: 50MB
|
||||
http:
|
||||
converters:
|
||||
preferred-json-mapper: fastjson
|
||||
encoding:
|
||||
force: true
|
||||
charset: UTF-8
|
||||
enabled: true
|
||||
freemarker:
|
||||
template-loader-path: classpath:/template/
|
||||
cache: false
|
||||
charset: UTF-8
|
||||
check-template-location: true
|
||||
content-type: text/html
|
||||
expose-request-attributes: false
|
||||
expose-session-attributes: false
|
||||
request-context-attribute: request
|
||||
suffix: .ftl
|
||||
cloud:
|
||||
sentinel:
|
||||
transport:
|
||||
# sentinel控制台地址。
|
||||
# 由于8080端口容易与其他服务端口冲突,可以在启动sentinel控制台时动态修改,如:
|
||||
# java -Dserver.port=8858 -jar sentinel-dashboard-$VERSION.jar
|
||||
# 改为8858后,下面的配置端口也需要改为:localhost:8858。
|
||||
dashboard: localhost:8858
|
||||
|
||||
# feign 配置
|
||||
feign:
|
||||
hystrix:
|
||||
enabled: true
|
||||
httpclient:
|
||||
enabled: true
|
||||
max-connections: 200
|
||||
max-connections-per-route: 50
|
||||
client:
|
||||
config:
|
||||
default:
|
||||
# 输出feignclient的日志,缺省值为none,可选值为none/basic/headers/full
|
||||
# 注意:需要把feignclient类所在包的日志级别设置为debug时才生效。如:
|
||||
# logging:
|
||||
# level:
|
||||
# com.demo.multi: info
|
||||
# com.demo.multi.coursepaperinterface.client: debug
|
||||
loggerLevel: full
|
||||
connectTimeout: 5000
|
||||
readTimeout: 10000
|
||||
compression:
|
||||
request:
|
||||
enabled: true
|
||||
response:
|
||||
enabled: true
|
||||
|
||||
hystrix:
|
||||
command:
|
||||
default:
|
||||
execution:
|
||||
isolation:
|
||||
strategy: SEMAPHORE
|
||||
thread:
|
||||
timeoutInMilliseconds: 30000
|
||||
shareSecurityContext: true
|
||||
|
||||
#请求处理的超时时间
|
||||
ribbon:
|
||||
ReadTimeout: 7000
|
||||
ConnectTimeout: 3000
|
||||
MaxAutoRetries: 1
|
||||
MaxAutoRetriesNextServer: 1
|
||||
|
||||
# 暴露监控端点
|
||||
management:
|
||||
metrics:
|
||||
tags:
|
||||
application:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
jmx:
|
||||
exposure:
|
||||
include: '*'
|
||||
endpoint:
|
||||
# 与中间件相关的健康详情也会被展示
|
||||
health:
|
||||
show-details: always
|
||||
configprops:
|
||||
# 在/actuator/configprops中,所有包含password的配置,将用 * 隐藏。
|
||||
# 如果不想隐藏任何配置项的值,可以直接使用如下被注释的空值。
|
||||
# keys-to-sanitize:
|
||||
keys-to-sanitize: password
|
||||
server:
|
||||
servlet:
|
||||
context-path: "/"
|
||||
|
||||
# 存储session数据的Redis,所有服务均需要,因此放到公共配置中。
|
||||
# 根据实际情况,该Redis也可以用于存储其他数据。
|
||||
redis:
|
||||
jedis:
|
||||
enabled: true
|
||||
host: localhost
|
||||
port: 6379
|
||||
timeout: 60000
|
||||
pool:
|
||||
maxTotal: 20
|
||||
maxIdle: 8
|
||||
minIdle: 0
|
||||
maxWait: 2000
|
||||
# redisson的配置。每个服务可以自己的配置文件中覆盖此选项。
|
||||
redisson:
|
||||
# 如果该值为false,系统将不会创建RedissionClient的bean。
|
||||
enabled: true
|
||||
# redis地址,多个地址之间逗号分隔。如果是从主机制,第一个为master,其余为slave。
|
||||
address: localhost:6379
|
||||
# 链接超时,单位毫秒。
|
||||
timeout: 6000
|
||||
# 单位毫秒。分布式锁的超时检测时长。
|
||||
# 如果一次锁内操作超该毫秒数,或在释放锁之前异常退出,Redis会在该时长之后主动删除该锁使用的key。
|
||||
lockWatchdogTimeout: 60000
|
||||
pool:
|
||||
# 连接池数量。
|
||||
poolSize: 20
|
||||
# 连接池中最小空闲数量。
|
||||
minIdle: 5
|
||||
@@ -0,0 +1,76 @@
|
||||
logging:
|
||||
level:
|
||||
# 这里设置的日志级别优先于log4j2.xml文件Loggers中的日志级别。
|
||||
com.orange.demo: info
|
||||
|
||||
server:
|
||||
port: 9001
|
||||
|
||||
application:
|
||||
# 缺省的文件上传根目录。
|
||||
uploadFileBaseDir: ./zz-resource/upload-files/course-class
|
||||
# 每个微服务的url目录上下文,如(/admin/upms),通常和网关的路由path一致。
|
||||
serviceContextPath: /admin/CourseClass
|
||||
# 是否忽略远程调用中出现的任何错误,包括逻辑异常和系统异常。
|
||||
# 通常在调试和测试阶段设置为false,以便及时发现问题。
|
||||
ignoreRpcError: false
|
||||
|
||||
sequence:
|
||||
# 是否使用基于美团Leaf的分布式Id生成器。
|
||||
advanceIdGenerator: true
|
||||
# 多个zk服务之间逗号分隔。
|
||||
zkAddress: localhost:2181
|
||||
# 与本机的ip一起构成zk中标识不同服务实例的key值。
|
||||
idPort: 19001
|
||||
# zk中生成WorkNode的路径。不同的业务可以使用不同的路径,以免冲突。
|
||||
zkPath: com/orange/demo
|
||||
|
||||
# mybatis的基本配置
|
||||
mybatis:
|
||||
mapperLocations: classpath:com/orange/demo/*/dao/mapper/*Mapper.xml
|
||||
typeAliasesPackage: com.orange.demo.*.model
|
||||
|
||||
mapper:
|
||||
mappers: tk.mybatis.mapper.common.Mapper,tk.mybatis.mapper.additional.insert.InsertListMapper
|
||||
not-empty: false
|
||||
identity: MYSQL
|
||||
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
reasonable: true
|
||||
supportMethodsArguments: false
|
||||
params: count=countSql
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
url: jdbc:mysql://localhost:3306/zzdemo-multi?characterEncoding=utf8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
name: course-class
|
||||
initialSize: 10
|
||||
minIdle: 10
|
||||
maxActive: 50
|
||||
maxWait: 60000
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
poolPreparedStatements: true
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
maxOpenPreparedStatements: 20
|
||||
validationQuery: SELECT 'x'
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
filters: stat,wall
|
||||
useGlobalDataSourceStat: true
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
url-pattern: "/*"
|
||||
exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*,/actuator/*"
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
urlPattern: /druid/*
|
||||
resetEnable: true
|
||||
67
orange-demo-service/zz-resource/config-data/gateway-dev.yaml
Normal file
67
orange-demo-service/zz-resource/config-data/gateway-dev.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
server:
|
||||
port: 8082
|
||||
|
||||
application:
|
||||
# Jwt令牌加密的签名值。
|
||||
tokenSigningKey: OrangeDemo
|
||||
# Jwt令牌在Http Header中的键名称。
|
||||
tokenHeaderKey: Authorization
|
||||
# Jwt令牌刷新后在Http Header中的键名称。
|
||||
refreshedTokenHeaderKey: RefreshedToken
|
||||
# Jwt令牌过期时间(毫秒)。
|
||||
expiration: 72000000
|
||||
# 跨域的IP白名单列表,多个IP之间逗号分隔(* 表示全部信任,空白表示禁用跨域信任)。
|
||||
credentialIpList: "*"
|
||||
# Session在Redis中的过期时间(秒)。
|
||||
sessionIdRedisExpiredSeconds: 86460
|
||||
# Session的用户权限在Redis中的过期时间(秒)。
|
||||
permRedisExpiredSeconds: 86400
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
gateway:
|
||||
discovery:
|
||||
locator:
|
||||
enabled: false
|
||||
lower-case-service-id: true
|
||||
routes:
|
||||
- id: upms-login
|
||||
uri: lb://upms
|
||||
predicates:
|
||||
- Path=/admin/login/**
|
||||
filters:
|
||||
- StripPrefix=0
|
||||
- name: Hystrix
|
||||
args:
|
||||
name: default
|
||||
fallbackUri: forward:/fallback
|
||||
- id: course-class
|
||||
uri: lb://course-class
|
||||
predicates:
|
||||
- Path=/admin/CourseClass/**
|
||||
filters:
|
||||
- StripPrefix=2
|
||||
- name: Hystrix
|
||||
args:
|
||||
name: default
|
||||
fallbackUri: forward:/fallback
|
||||
- id: stats
|
||||
uri: lb://stats
|
||||
predicates:
|
||||
- Path=/admin/stats/**
|
||||
filters:
|
||||
- StripPrefix=2
|
||||
- name: Hystrix
|
||||
args:
|
||||
name: default
|
||||
fallbackUri: forward:/fallback
|
||||
- id: upms
|
||||
uri: lb://upms
|
||||
predicates:
|
||||
- Path=/admin/upms/**
|
||||
filters:
|
||||
- StripPrefix=2
|
||||
- name: Hystrix
|
||||
args:
|
||||
name: default
|
||||
fallbackUri: forward:/fallback
|
||||
76
orange-demo-service/zz-resource/config-data/stats-dev.yaml
Normal file
76
orange-demo-service/zz-resource/config-data/stats-dev.yaml
Normal file
@@ -0,0 +1,76 @@
|
||||
logging:
|
||||
level:
|
||||
# 这里设置的日志级别优先于log4j2.xml文件Loggers中的日志级别。
|
||||
com.orange.demo: info
|
||||
|
||||
server:
|
||||
port: 9002
|
||||
|
||||
application:
|
||||
# 缺省的文件上传根目录。
|
||||
uploadFileBaseDir: ./zz-resource/upload-files/stats
|
||||
# 每个微服务的url目录上下文,如(/admin/upms),通常和网关的路由path一致。
|
||||
serviceContextPath: /admin/stats
|
||||
# 是否忽略远程调用中出现的任何错误,包括逻辑异常和系统异常。
|
||||
# 通常在调试和测试阶段设置为false,以便及时发现问题。
|
||||
ignoreRpcError: false
|
||||
|
||||
sequence:
|
||||
# 是否使用基于美团Leaf的分布式Id生成器。
|
||||
advanceIdGenerator: true
|
||||
# 多个zk服务之间逗号分隔。
|
||||
zkAddress: localhost:2181
|
||||
# 与本机的ip一起构成zk中标识不同服务实例的key值。
|
||||
idPort: 19002
|
||||
# zk中生成WorkNode的路径。不同的业务可以使用不同的路径,以免冲突。
|
||||
zkPath: com/orange/demo
|
||||
|
||||
# mybatis的基本配置
|
||||
mybatis:
|
||||
mapperLocations: classpath:com/orange/demo/*/dao/mapper/*Mapper.xml
|
||||
typeAliasesPackage: com.orange.demo.*.model
|
||||
|
||||
mapper:
|
||||
mappers: tk.mybatis.mapper.common.Mapper,tk.mybatis.mapper.additional.insert.InsertListMapper
|
||||
not-empty: false
|
||||
identity: MYSQL
|
||||
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
reasonable: true
|
||||
supportMethodsArguments: false
|
||||
params: count=countSql
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
url: jdbc:mysql://localhost:3306/zzdemo-multi?characterEncoding=utf8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
name: stats
|
||||
initialSize: 10
|
||||
minIdle: 10
|
||||
maxActive: 50
|
||||
maxWait: 60000
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
poolPreparedStatements: true
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
maxOpenPreparedStatements: 20
|
||||
validationQuery: SELECT 'x'
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
filters: stat,wall
|
||||
useGlobalDataSourceStat: true
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
url-pattern: "/*"
|
||||
exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*,/actuator/*"
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
urlPattern: /druid/*
|
||||
resetEnable: true
|
||||
77
orange-demo-service/zz-resource/config-data/upms-dev.yaml
Normal file
77
orange-demo-service/zz-resource/config-data/upms-dev.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
logging:
|
||||
level:
|
||||
# 这里设置的日志级别优先于log4j2.xml文件Loggers中的日志级别。
|
||||
com.orange.demo: info
|
||||
|
||||
server:
|
||||
port: 9000
|
||||
|
||||
application:
|
||||
# 缺省的文件上传根目录。
|
||||
uploadFileBaseDir: ./zz-resource/upload-files/upms
|
||||
# 初始化密码。
|
||||
defaultUserPassword: 123456
|
||||
# 每个微服务的url目录上下文,如(/admin/upms),通常和网关的路由path一致。
|
||||
serviceContextPath: /admin/upms
|
||||
# 是否忽略远程调用中出现的任何错误,包括逻辑异常和系统异常。
|
||||
# 通常在调试和测试阶段设置为false,以便及时发现问题。
|
||||
ignoreRpcError: false
|
||||
|
||||
sequence:
|
||||
# 是否使用基于美团Leaf的分布式Id生成器。
|
||||
advanceIdGenerator: true
|
||||
# 多个zk服务之间逗号分隔。
|
||||
zkAddress: localhost:2181
|
||||
# 与本机的ip一起构成zk中标识不同服务实例的key值。
|
||||
idPort: 19000
|
||||
# zk中生成WorkNode的路径。不同的业务可以使用不同的路径,以免冲突。
|
||||
zkPath: com/orange/demo
|
||||
|
||||
mybatis:
|
||||
mapperLocations: classpath:com/orange/demo/*/dao/mapper/*Mapper.xml
|
||||
typeAliasesPackage: com.orange.demo.*.model
|
||||
|
||||
mapper:
|
||||
mappers: tk.mybatis.mapper.common.Mapper,tk.mybatis.mapper.additional.insert.InsertListMapper
|
||||
not-empty: false
|
||||
identity: MYSQL
|
||||
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
reasonable: true
|
||||
supportMethodsArguments: false
|
||||
params: count=countSql
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
url: jdbc:mysql://localhost:3306/zzdemo-multi?characterEncoding=utf8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
name: upms
|
||||
initialSize: 10
|
||||
minIdle: 10
|
||||
maxActive: 50
|
||||
maxWait: 60000
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
poolPreparedStatements: true
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
maxOpenPreparedStatements: 20
|
||||
validationQuery: SELECT 'x'
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
filters: stat,wall
|
||||
useGlobalDataSourceStat: true
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
url-pattern: "/*"
|
||||
exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*,/actuator/*"
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
urlPattern: /druid/*
|
||||
resetEnable: true
|
||||
BIN
orange-demo-service/zz-resource/docker-files/.DS_Store
vendored
Normal file
BIN
orange-demo-service/zz-resource/docker-files/.DS_Store
vendored
Normal file
Binary file not shown.
19
orange-demo-service/zz-resource/docker-files/clear-data.sh
Normal file
19
orange-demo-service/zz-resource/docker-files/clear-data.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#! /bin/bash
|
||||
|
||||
# 如果执行的是docker-compose down,下次再docker-compose up启动中间件时,
|
||||
# kafka 可能会因为之前的强行退出而出现position错误,此时可以执行当前shell,
|
||||
# 删除他们的数据。
|
||||
# 我们更推荐docker-compose stop的方式停止服务,下次启动docker-compose start。
|
||||
|
||||
rm -rf ./data/redis/*
|
||||
rm -rf ./data/elasticsearch/*
|
||||
rm -rf ./data/kafka/*
|
||||
rm -rf ./data/logstash/*
|
||||
rm -rf ./data/logstash/.lock
|
||||
rm -rf ./data/zookeeper/*
|
||||
|
||||
rm -rf ./logs/redis/*
|
||||
rm -rf ./logs/elasticsearch/*
|
||||
rm -rf ./logs/kafka/*
|
||||
rm -rf ./logs/logstash/*
|
||||
rm -rf ./logs/zookeeper/*
|
||||
@@ -0,0 +1,72 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
|
||||
nacos:
|
||||
image: nacos/nacos-server:1.3.1
|
||||
container_name: nacos-standalone
|
||||
environment:
|
||||
- PREFER_HOST_MODE=hostname
|
||||
- MODE=standalone
|
||||
volumes:
|
||||
- ./logs/nacos/:/home/nacos/logs
|
||||
- ./data/nacos/:/home/nacos/data
|
||||
ports:
|
||||
- "8848:8848"
|
||||
networks:
|
||||
- zz-test
|
||||
|
||||
redis:
|
||||
container_name: redis
|
||||
build:
|
||||
context: services/redis/
|
||||
args:
|
||||
- REDIS_VER=4
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- ./services/redis/redis.conf:/usr/local/etc/redis/redis.conf:rw
|
||||
- ./data/redis:/data:rw
|
||||
- ./logs/redis:/var/log/:rw
|
||||
networks:
|
||||
- zz-test
|
||||
|
||||
zookeeper:
|
||||
image: zookeeper:3.5.5
|
||||
ports:
|
||||
- "2181:2181"
|
||||
volumes:
|
||||
- ./logs/zookeeper/:/data
|
||||
- ./data/zookeeper/:/datalog
|
||||
networks:
|
||||
- zz-test
|
||||
|
||||
kafka:
|
||||
image: wurstmeister/kafka:2.12-2.4.0
|
||||
ports:
|
||||
- "9092:9092"
|
||||
expose:
|
||||
- "9093"
|
||||
environment:
|
||||
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092
|
||||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
|
||||
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
|
||||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
||||
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
|
||||
volumes:
|
||||
- ./data/kafka/:/kafka
|
||||
networks:
|
||||
- zz-test
|
||||
depends_on:
|
||||
- zookeeper
|
||||
|
||||
sentinel:
|
||||
image: bladex/sentinel-dashboard
|
||||
ports:
|
||||
- "8858:8858"
|
||||
networks:
|
||||
- zz-test
|
||||
|
||||
networks:
|
||||
zz-test:
|
||||
driver: bridge
|
||||
@@ -0,0 +1,7 @@
|
||||
ARG ES_VER
|
||||
|
||||
FROM elasticsearch:${ES_VER}
|
||||
|
||||
# 设置时区为上海
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
@@ -0,0 +1,15 @@
|
||||
# 设置支持Elasticsearch-Head
|
||||
http.cors.enabled: true
|
||||
http.cors.allow-origin: "*"
|
||||
|
||||
# 设置集群Master配置信息
|
||||
cluster.name: "docker-cluster-master"
|
||||
# 设置网络,如果是本机的话就是127.0.0.1,其他服务器配置对应的IP地址即可(0.0.0.0支持外网访问)
|
||||
network.host: 0.0.0.0
|
||||
|
||||
# 密码验证
|
||||
# xpack.security.enabled: true
|
||||
# xpack.security.transport.ssl.enabled: true
|
||||
|
||||
# 单节点模式
|
||||
discovery.type: single-node
|
||||
@@ -0,0 +1,3 @@
|
||||
ARG KAFKA_VER
|
||||
|
||||
FROM wurstmeister/kafka:${KAFKA_VER}
|
||||
@@ -0,0 +1,19 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name=local-console-sink
|
||||
connector.class=org.apache.kafka.connect.file.FileStreamSinkConnector
|
||||
tasks.max=1
|
||||
topics=connect-test
|
||||
@@ -0,0 +1,19 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name=local-console-source
|
||||
connector.class=org.apache.kafka.connect.file.FileStreamSourceConnector
|
||||
tasks.max=1
|
||||
topic=connect-test
|
||||
@@ -0,0 +1,86 @@
|
||||
##
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
|
||||
# This file contains some of the configurations for the Kafka Connect distributed worker. This file is intended
|
||||
# to be used with the examples, and some settings may differ from those used in a production system, especially
|
||||
# the `bootstrap.servers` and those specifying replication factors.
|
||||
|
||||
# A list of host/port pairs to use for establishing the initial connection to the Kafka cluster.
|
||||
bootstrap.servers=localhost:9092
|
||||
|
||||
# unique name for the cluster, used in forming the Connect cluster group. Note that this must not conflict with consumer group IDs
|
||||
group.id=connect-cluster
|
||||
|
||||
# The converters specify the format of data in Kafka and how to translate it into Connect data. Every Connect user will
|
||||
# need to configure these based on the format they want their data in when loaded from or stored into Kafka
|
||||
key.converter=org.apache.kafka.connect.json.JsonConverter
|
||||
value.converter=org.apache.kafka.connect.json.JsonConverter
|
||||
# Converter-specific settings can be passed in by prefixing the Converter's setting with the converter we want to apply
|
||||
# it to
|
||||
key.converter.schemas.enable=true
|
||||
value.converter.schemas.enable=true
|
||||
|
||||
# Topic to use for storing offsets. This topic should have many partitions and be replicated and compacted.
|
||||
# Kafka Connect will attempt to create the topic automatically when needed, but you can always manually create
|
||||
# the topic before starting Kafka Connect if a specific topic configuration is needed.
|
||||
# Most users will want to use the built-in default replication factor of 3 or in some cases even specify a larger value.
|
||||
# Since this means there must be at least as many brokers as the maximum replication factor used, we'd like to be able
|
||||
# to run this example on a single-broker cluster and so here we instead set the replication factor to 1.
|
||||
offset.storage.topic=connect-offsets
|
||||
offset.storage.replication.factor=1
|
||||
#offset.storage.partitions=25
|
||||
|
||||
# Topic to use for storing connector and task configurations; note that this should be a single partition, highly replicated,
|
||||
# and compacted topic. Kafka Connect will attempt to create the topic automatically when needed, but you can always manually create
|
||||
# the topic before starting Kafka Connect if a specific topic configuration is needed.
|
||||
# Most users will want to use the built-in default replication factor of 3 or in some cases even specify a larger value.
|
||||
# Since this means there must be at least as many brokers as the maximum replication factor used, we'd like to be able
|
||||
# to run this example on a single-broker cluster and so here we instead set the replication factor to 1.
|
||||
config.storage.topic=connect-configs
|
||||
config.storage.replication.factor=1
|
||||
|
||||
# Topic to use for storing statuses. This topic can have multiple partitions and should be replicated and compacted.
|
||||
# Kafka Connect will attempt to create the topic automatically when needed, but you can always manually create
|
||||
# the topic before starting Kafka Connect if a specific topic configuration is needed.
|
||||
# Most users will want to use the built-in default replication factor of 3 or in some cases even specify a larger value.
|
||||
# Since this means there must be at least as many brokers as the maximum replication factor used, we'd like to be able
|
||||
# to run this example on a single-broker cluster and so here we instead set the replication factor to 1.
|
||||
status.storage.topic=connect-status
|
||||
status.storage.replication.factor=1
|
||||
#status.storage.partitions=5
|
||||
|
||||
# Flush much faster than normal, which is useful for testing/debugging
|
||||
offset.flush.interval.ms=10000
|
||||
|
||||
# These are provided to inform the user about the presence of the REST host and port configs
|
||||
# Hostname & Port for the REST API to listen on. If this is set, it will bind to the interface used to listen to requests.
|
||||
#rest.host.name=
|
||||
#rest.port=8083
|
||||
|
||||
# The Hostname & Port that will be given out to other workers to connect to i.e. URLs that are routable from other servers.
|
||||
#rest.advertised.host.name=
|
||||
#rest.advertised.port=
|
||||
|
||||
# Set to a list of filesystem paths separated by commas (,) to enable class loading isolation for plugins
|
||||
# (connectors, converters, transformations). The list should consist of top level directories that include
|
||||
# any combination of:
|
||||
# a) directories immediately containing jars with plugins and their dependencies
|
||||
# b) uber-jars with plugins and their dependencies
|
||||
# c) directories immediately containing the package directory structure of classes of plugins and their dependencies
|
||||
# Examples:
|
||||
# plugin.path=/usr/local/share/java,/usr/local/share/kafka/plugins,/opt/connectors,
|
||||
#plugin.path=
|
||||
@@ -0,0 +1,20 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name=local-file-sink
|
||||
connector.class=FileStreamSink
|
||||
tasks.max=1
|
||||
file=test.sink.txt
|
||||
topics=connect-test
|
||||
@@ -0,0 +1,20 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name=local-file-source
|
||||
connector.class=FileStreamSource
|
||||
tasks.max=1
|
||||
file=test.txt
|
||||
topic=connect-test
|
||||
@@ -0,0 +1,32 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
log4j.rootLogger=INFO, stdout
|
||||
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
#
|
||||
# The `%X{connector.context}` parameter in the layout includes connector-specific and task-specific information
|
||||
# in the log message, where appropriate. This makes it easier to identify those log messages that apply to a
|
||||
# specific connector. Simply add this parameter to the log layout configuration below to include the contextual information.
|
||||
#
|
||||
#log4j.appender.stdout.layout.ConversionPattern=[%d] %p %X{connector.context}%m (%c:%L)%n
|
||||
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n
|
||||
|
||||
log4j.logger.org.apache.zookeeper=ERROR
|
||||
log4j.logger.org.I0Itec.zkclient=ERROR
|
||||
log4j.logger.org.reflections=ERROR
|
||||
@@ -0,0 +1,41 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# These are defaults. This file just demonstrates how to override some settings.
|
||||
bootstrap.servers=localhost:9092
|
||||
|
||||
# The converters specify the format of data in Kafka and how to translate it into Connect data. Every Connect user will
|
||||
# need to configure these based on the format they want their data in when loaded from or stored into Kafka
|
||||
key.converter=org.apache.kafka.connect.json.JsonConverter
|
||||
value.converter=org.apache.kafka.connect.json.JsonConverter
|
||||
# Converter-specific settings can be passed in by prefixing the Converter's setting with the converter we want to apply
|
||||
# it to
|
||||
key.converter.schemas.enable=true
|
||||
value.converter.schemas.enable=true
|
||||
|
||||
offset.storage.file.filename=/tmp/connect.offsets
|
||||
# Flush much faster than normal, which is useful for testing/debugging
|
||||
offset.flush.interval.ms=10000
|
||||
|
||||
# Set to a list of filesystem paths separated by commas (,) to enable class loading isolation for plugins
|
||||
# (connectors, converters, transformations). The list should consist of top level directories that include
|
||||
# any combination of:
|
||||
# a) directories immediately containing jars with plugins and their dependencies
|
||||
# b) uber-jars with plugins and their dependencies
|
||||
# c) directories immediately containing the package directory structure of classes of plugins and their dependencies
|
||||
# Note: symlinks will be followed to discover dependencies or plugins.
|
||||
# Examples:
|
||||
# plugin.path=/usr/local/share/java,/usr/local/share/kafka/plugins,/opt/connectors,
|
||||
#plugin.path=
|
||||
@@ -0,0 +1,26 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# see org.apache.kafka.clients.consumer.ConsumerConfig for more details
|
||||
|
||||
# list of brokers used for bootstrapping knowledge about the rest of the cluster
|
||||
# format: host1:port1,host2:port2 ...
|
||||
bootstrap.servers=localhost:9092
|
||||
|
||||
# consumer group id
|
||||
group.id=test-consumer-group
|
||||
|
||||
# What to do when there is no initial offset in Kafka or if the current
|
||||
# offset does not exist any more on the server: latest, earliest, none
|
||||
#auto.offset.reset=
|
||||
@@ -0,0 +1,92 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Unspecified loggers and loggers with additivity=true output to server.log and stdout
|
||||
# Note that INFO only applies to unspecified loggers, the log level of the child logger is used otherwise
|
||||
log4j.rootLogger=INFO, stdout, kafkaAppender
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n
|
||||
|
||||
log4j.appender.kafkaAppender=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.kafkaAppender.DatePattern='.'yyyy-MM-dd-HH
|
||||
log4j.appender.kafkaAppender.File=${kafka.logs.dir}/server.log
|
||||
log4j.appender.kafkaAppender.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.kafkaAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
|
||||
|
||||
log4j.appender.stateChangeAppender=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.stateChangeAppender.DatePattern='.'yyyy-MM-dd-HH
|
||||
log4j.appender.stateChangeAppender.File=${kafka.logs.dir}/state-change.log
|
||||
log4j.appender.stateChangeAppender.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stateChangeAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
|
||||
|
||||
log4j.appender.requestAppender=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.requestAppender.DatePattern='.'yyyy-MM-dd-HH
|
||||
log4j.appender.requestAppender.File=${kafka.logs.dir}/kafka-request.log
|
||||
log4j.appender.requestAppender.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.requestAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
|
||||
|
||||
log4j.appender.cleanerAppender=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.cleanerAppender.DatePattern='.'yyyy-MM-dd-HH
|
||||
log4j.appender.cleanerAppender.File=${kafka.logs.dir}/log-cleaner.log
|
||||
log4j.appender.cleanerAppender.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.cleanerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
|
||||
|
||||
log4j.appender.controllerAppender=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.controllerAppender.DatePattern='.'yyyy-MM-dd-HH
|
||||
log4j.appender.controllerAppender.File=${kafka.logs.dir}/controller.log
|
||||
log4j.appender.controllerAppender.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.controllerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
|
||||
|
||||
log4j.appender.authorizerAppender=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.authorizerAppender.DatePattern='.'yyyy-MM-dd-HH
|
||||
log4j.appender.authorizerAppender.File=${kafka.logs.dir}/kafka-authorizer.log
|
||||
log4j.appender.authorizerAppender.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.authorizerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
|
||||
|
||||
# Change the two lines below to adjust ZK client logging
|
||||
log4j.logger.org.I0Itec.zkclient.ZkClient=INFO
|
||||
log4j.logger.org.apache.zookeeper=INFO
|
||||
|
||||
# Change the two lines below to adjust the general broker logging level (output to server.log and stdout)
|
||||
log4j.logger.kafka=INFO
|
||||
log4j.logger.org.apache.kafka=INFO
|
||||
|
||||
# Change to DEBUG or TRACE to enable request logging
|
||||
log4j.logger.kafka.request.logger=WARN, requestAppender
|
||||
log4j.additivity.kafka.request.logger=false
|
||||
|
||||
# Uncomment the lines below and change log4j.logger.kafka.network.RequestChannel$ to TRACE for additional output
|
||||
# related to the handling of requests
|
||||
#log4j.logger.kafka.network.Processor=TRACE, requestAppender
|
||||
#log4j.logger.kafka.server.KafkaApis=TRACE, requestAppender
|
||||
#log4j.additivity.kafka.server.KafkaApis=false
|
||||
log4j.logger.kafka.network.RequestChannel$=WARN, requestAppender
|
||||
log4j.additivity.kafka.network.RequestChannel$=false
|
||||
|
||||
log4j.logger.kafka.controller=TRACE, controllerAppender
|
||||
log4j.additivity.kafka.controller=false
|
||||
|
||||
log4j.logger.kafka.log.LogCleaner=INFO, cleanerAppender
|
||||
log4j.additivity.kafka.log.LogCleaner=false
|
||||
|
||||
log4j.logger.state.change.logger=TRACE, stateChangeAppender
|
||||
log4j.additivity.state.change.logger=false
|
||||
|
||||
# Access denials are logged at INFO level, change to DEBUG to also log allowed accesses
|
||||
log4j.logger.kafka.authorizer.logger=INFO, authorizerAppender
|
||||
log4j.additivity.kafka.authorizer.logger=false
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# see org.apache.kafka.clients.producer.ProducerConfig for more details
|
||||
|
||||
############################# Producer Basics #############################
|
||||
|
||||
# list of brokers used for bootstrapping knowledge about the rest of the cluster
|
||||
# format: host1:port1,host2:port2 ...
|
||||
bootstrap.servers=localhost:9092
|
||||
|
||||
# specify the compression codec for all data generated: none, gzip, snappy, lz4, zstd
|
||||
compression.type=none
|
||||
|
||||
# name of the partitioner class for partitioning events; default partition spreads data randomly
|
||||
#partitioner.class=
|
||||
|
||||
# the maximum amount of time the client will wait for the response of a request
|
||||
#request.timeout.ms=
|
||||
|
||||
# how long `KafkaProducer.send` and `KafkaProducer.partitionsFor` will block for
|
||||
#max.block.ms=
|
||||
|
||||
# the producer will wait for up to the given delay to allow other records to be sent so that the sends can be batched together
|
||||
#linger.ms=
|
||||
|
||||
# the maximum size of a request in bytes
|
||||
#max.request.size=
|
||||
|
||||
# the default batch size in bytes when batching multiple records sent to a partition
|
||||
#batch.size=
|
||||
|
||||
# the total bytes of memory the producer can use to buffer records waiting to be sent to the server
|
||||
#buffer.memory=
|
||||
@@ -0,0 +1,137 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# see kafka.server.KafkaConfig for additional details and defaults
|
||||
|
||||
############################# Server Basics #############################
|
||||
|
||||
# The id of the broker. This must be set to a unique integer for each broker.
|
||||
broker.id=0
|
||||
|
||||
############################# Socket Server Settings #############################
|
||||
|
||||
# The address the socket server listens on. It will get the value returned from
|
||||
# java.net.InetAddress.getCanonicalHostName() if not configured.
|
||||
# FORMAT:
|
||||
# listeners = listener_name://host_name:port
|
||||
# EXAMPLE:
|
||||
# listeners = PLAINTEXT://your.host.name:9092
|
||||
listeners=PLAINTEXT://0.0.0.0:9092
|
||||
|
||||
# Hostname and port the broker will advertise to producers and consumers. If not set,
|
||||
# it uses the value for "listeners" if configured. Otherwise, it will use the value
|
||||
# returned from java.net.InetAddress.getCanonicalHostName().
|
||||
advertised.listeners=PLAINTEXT://192.168.0.1:9092
|
||||
|
||||
# Maps listener names to security protocols, the default is for them to be the same. See the config documentation for more details
|
||||
#listener.security.protocol.map=PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
|
||||
|
||||
# The number of threads that the server uses for receiving requests from the network and sending responses to the network
|
||||
num.network.threads=3
|
||||
|
||||
# The number of threads that the server uses for processing requests, which may include disk I/O
|
||||
num.io.threads=8
|
||||
|
||||
# The send buffer (SO_SNDBUF) used by the socket server
|
||||
socket.send.buffer.bytes=102400
|
||||
|
||||
# The receive buffer (SO_RCVBUF) used by the socket server
|
||||
socket.receive.buffer.bytes=102400
|
||||
|
||||
# The maximum size of a request that the socket server will accept (protection against OOM)
|
||||
socket.request.max.bytes=104857600
|
||||
|
||||
|
||||
############################# Log Basics #############################
|
||||
|
||||
# A comma separated list of directories under which to store log files
|
||||
log.dirs=/kafka/kafka-logs-7d53de35ca1e
|
||||
|
||||
# The default number of log partitions per topic. More partitions allow greater
|
||||
# parallelism for consumption, but this will also result in more files across
|
||||
# the brokers.
|
||||
num.partitions=1
|
||||
|
||||
# The number of threads per data directory to be used for log recovery at startup and flushing at shutdown.
|
||||
# This value is recommended to be increased for installations with data dirs located in RAID array.
|
||||
num.recovery.threads.per.data.dir=1
|
||||
|
||||
############################# Internal Topic Settings #############################
|
||||
# The replication factor for the group metadata internal topics "__consumer_offsets" and "__transaction_state"
|
||||
# For anything other than development testing, a value greater than 1 is recommended for to ensure availability such as 3.
|
||||
offsets.topic.replication.factor=1
|
||||
transaction.state.log.replication.factor=1
|
||||
transaction.state.log.min.isr=1
|
||||
|
||||
############################# Log Flush Policy #############################
|
||||
|
||||
# Messages are immediately written to the filesystem but by default we only fsync() to sync
|
||||
# the OS cache lazily. The following configurations control the flush of data to disk.
|
||||
# There are a few important trade-offs here:
|
||||
# 1. Durability: Unflushed data may be lost if you are not using replication.
|
||||
# 2. Latency: Very large flush intervals may lead to latency spikes when the flush does occur as there will be a lot of data to flush.
|
||||
# 3. Throughput: The flush is generally the most expensive operation, and a small flush interval may lead to excessive seeks.
|
||||
# The settings below allow one to configure the flush policy to flush data after a period of time or
|
||||
# every N messages (or both). This can be done globally and overridden on a per-topic basis.
|
||||
|
||||
# The number of messages to accept before forcing a flush of data to disk
|
||||
#log.flush.interval.messages=10000
|
||||
|
||||
# The maximum amount of time a message can sit in a log before we force a flush
|
||||
#log.flush.interval.ms=1000
|
||||
|
||||
############################# Log Retention Policy #############################
|
||||
|
||||
# The following configurations control the disposal of log segments. The policy can
|
||||
# be set to delete segments after a period of time, or after a given size has accumulated.
|
||||
# A segment will be deleted whenever *either* of these criteria are met. Deletion always happens
|
||||
# from the end of the log.
|
||||
|
||||
# The minimum age of a log file to be eligible for deletion due to age
|
||||
log.retention.hours=168
|
||||
|
||||
# A size-based retention policy for logs. Segments are pruned from the log unless the remaining
|
||||
# segments drop below log.retention.bytes. Functions independently of log.retention.hours.
|
||||
#log.retention.bytes=1073741824
|
||||
|
||||
# The maximum size of a log segment file. When this size is reached a new log segment will be created.
|
||||
log.segment.bytes=1073741824
|
||||
|
||||
# The interval at which log segments are checked to see if they can be deleted according
|
||||
# to the retention policies
|
||||
log.retention.check.interval.ms=300000
|
||||
|
||||
############################# Zookeeper #############################
|
||||
|
||||
# Zookeeper connection string (see zookeeper docs for details).
|
||||
# This is a comma separated host:port pairs, each corresponding to a zk
|
||||
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
|
||||
# You can also append an optional chroot string to the urls to specify the
|
||||
# root directory for all kafka znodes.
|
||||
zookeeper.connect=zookeeper:2181
|
||||
|
||||
# Timeout in ms for connecting to zookeeper
|
||||
zookeeper.connection.timeout.ms=6000
|
||||
|
||||
|
||||
############################# Group Coordinator Settings #############################
|
||||
|
||||
# The following configuration specifies the time, in milliseconds, that the GroupCoordinator will delay the initial consumer rebalance.
|
||||
# The rebalance will be further delayed by the value of group.initial.rebalance.delay.ms as new members join the group, up to a maximum of max.poll.interval.ms.
|
||||
# The default value for this is 3 seconds.
|
||||
# We override this to 0 here as it makes for a better out-of-the-box experience for development and testing.
|
||||
# However, in production environments the default value of 3 seconds is more suitable as this will help to avoid unnecessary, and potentially expensive, rebalances during application startup.
|
||||
group.initial.rebalance.delay.ms=0
|
||||
port=9092
|
||||
@@ -0,0 +1,21 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
log4j.rootLogger=WARN, stderr
|
||||
|
||||
log4j.appender.stderr=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stderr.layout.ConversionPattern=[%d] %p %m (%c)%n
|
||||
log4j.appender.stderr.Target=System.err
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"_comment": [
|
||||
"Licensed to the Apache Software Foundation (ASF) under one or more",
|
||||
"contributor license agreements. See the NOTICE file distributed with",
|
||||
"this work for additional information regarding copyright ownership.",
|
||||
"The ASF licenses this file to You under the Apache License, Version 2.0",
|
||||
"(the \"License\"); you may not use this file except in compliance with",
|
||||
"the License. You may obtain a copy of the License at",
|
||||
"",
|
||||
"http://www.apache.org/licenses/LICENSE-2.0",
|
||||
"",
|
||||
"Unless required by applicable law or agreed to in writing, software",
|
||||
"distributed under the License is distributed on an \"AS IS\" BASIS,",
|
||||
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
|
||||
"See the License for the specific language governing permissions and",
|
||||
"limitations under the License."
|
||||
],
|
||||
"platform": "org.apache.kafka.trogdor.basic.BasicPlatform", "nodes": {
|
||||
"node0": {
|
||||
"hostname": "localhost",
|
||||
"trogdor.agent.port": 8888,
|
||||
"trogdor.coordinator.port": 8889
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# the directory where the snapshot is stored.
|
||||
dataDir=/tmp/zookeeper
|
||||
# the port at which the clients will connect
|
||||
clientPort=2181
|
||||
# disable the per-ip limit on the number of connections since this is a non-production config
|
||||
maxClientCnxns=0
|
||||
@@ -0,0 +1,3 @@
|
||||
ARG KIBANA_VER
|
||||
|
||||
FROM kibana:${KIBANA_VER}
|
||||
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# ** THIS IS AN AUTO-GENERATED FILE **
|
||||
#
|
||||
|
||||
# Default Kibana configuration for docker target
|
||||
server.name: kibana
|
||||
server.host: "0"
|
||||
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
|
||||
# elasticsearch.username: ""
|
||||
# elasticsearch.password: ""
|
||||
|
||||
# 汉化
|
||||
i18n.locale: "zh-CN"
|
||||
@@ -0,0 +1,3 @@
|
||||
ARG LOGSTASH_VER
|
||||
|
||||
FROM logstash:${LOGSTASH_VER}
|
||||
@@ -0,0 +1,2 @@
|
||||
http.host: "0.0.0.0"
|
||||
xpack.monitoring.elasticsearch.hosts: [ "http://elasticsearch:9200" ]
|
||||
@@ -0,0 +1,6 @@
|
||||
# This file is where you define your pipelines. You can define multiple.
|
||||
# For more information on multiple pipelines, see the documentation:
|
||||
# https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html
|
||||
|
||||
- pipeline.id: main
|
||||
path.config: "/usr/share/logstash/pipeline"
|
||||
@@ -0,0 +1,15 @@
|
||||
input {
|
||||
kafka {
|
||||
bootstrap_servers => "kafka:9093"
|
||||
topics => "zz-log-topic"
|
||||
codec => plain
|
||||
}
|
||||
}
|
||||
|
||||
# 监听
|
||||
output {
|
||||
elasticsearch {
|
||||
hosts => ["http://elasticsearch:9200"]
|
||||
index => "logstash-%{+YYYY-MM}"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
ARG REDIS_VER
|
||||
|
||||
FROM redis:${REDIS_VER}
|
||||
|
||||
COPY redis.conf /usr/local/etc/redis/redis.conf
|
||||
CMD ["redis-server", "/usr/local/etc/redis/redis.conf"]
|
||||
|
||||
# 设置时区为上海
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
# Ubuntu软件源选择中国的服务器
|
||||
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
|
||||
## transaction log store, only used in seata-server
|
||||
store {
|
||||
## store mode: file、db
|
||||
mode = "file"
|
||||
|
||||
## file store property
|
||||
file {
|
||||
## store location dir
|
||||
dir = "sessionStore"
|
||||
# branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions
|
||||
maxBranchSessionSize = 16384
|
||||
# globe session size , if exceeded throws exceptions
|
||||
maxGlobalSessionSize = 512
|
||||
# file buffer size , if exceeded allocate new buffer
|
||||
fileWriteBufferCacheSize = 16384
|
||||
# when recover batch read size
|
||||
sessionReloadReadSize = 100
|
||||
# async, sync
|
||||
flushDiskMode = async
|
||||
}
|
||||
|
||||
## database store property
|
||||
db {
|
||||
## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp) etc.
|
||||
datasource = "druid"
|
||||
## mysql/oracle/postgresql/h2/oceanbase etc.
|
||||
dbType = "mysql"
|
||||
driverClassName = "com.mysql.jdbc.Driver"
|
||||
url = "jdbc:mysql://127.0.0.1:3306/seata"
|
||||
user = "mysql"
|
||||
password = "mysql"
|
||||
minConn = 5
|
||||
maxConn = 30
|
||||
globalTable = "global_table"
|
||||
branchTable = "branch_table"
|
||||
lockTable = "lock_table"
|
||||
queryLimit = 100
|
||||
maxWait = 5000
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
registry {
|
||||
# file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
|
||||
type = "file"
|
||||
|
||||
nacos {
|
||||
serverAddr = "localhost"
|
||||
namespace = ""
|
||||
cluster = "default"
|
||||
username = ""
|
||||
password = ""
|
||||
}
|
||||
eureka {
|
||||
serviceUrl = "http://localhost:8761/eureka"
|
||||
application = "default"
|
||||
weight = "1"
|
||||
}
|
||||
redis {
|
||||
serverAddr = "localhost:6379"
|
||||
db = 0
|
||||
password = ""
|
||||
cluster = "default"
|
||||
timeout = 0
|
||||
}
|
||||
zk {
|
||||
cluster = "default"
|
||||
serverAddr = "127.0.0.1:2181"
|
||||
sessionTimeout = 6000
|
||||
connectTimeout = 2000
|
||||
username = ""
|
||||
password = ""
|
||||
}
|
||||
consul {
|
||||
cluster = "default"
|
||||
serverAddr = "127.0.0.1:8500"
|
||||
}
|
||||
etcd3 {
|
||||
cluster = "default"
|
||||
serverAddr = "http://localhost:2379"
|
||||
}
|
||||
sofa {
|
||||
serverAddr = "127.0.0.1:9603"
|
||||
application = "default"
|
||||
region = "DEFAULT_ZONE"
|
||||
datacenter = "DefaultDataCenter"
|
||||
cluster = "default"
|
||||
group = "SEATA_GROUP"
|
||||
addressWaitTime = "3000"
|
||||
}
|
||||
file {
|
||||
name = "file.conf"
|
||||
}
|
||||
}
|
||||
|
||||
config {
|
||||
# file、nacos 、apollo、zk、consul、etcd3
|
||||
type = "file"
|
||||
|
||||
nacos {
|
||||
serverAddr = "localhost"
|
||||
namespace = ""
|
||||
group = "SEATA_GROUP"
|
||||
username = ""
|
||||
password = ""
|
||||
}
|
||||
consul {
|
||||
serverAddr = "127.0.0.1:8500"
|
||||
}
|
||||
apollo {
|
||||
appId = "seata-server"
|
||||
apolloMeta = "http://192.168.1.204:8801"
|
||||
namespace = "application"
|
||||
}
|
||||
zk {
|
||||
serverAddr = "127.0.0.1:2181"
|
||||
sessionTimeout = 6000
|
||||
connectTimeout = 2000
|
||||
username = ""
|
||||
password = ""
|
||||
}
|
||||
etcd3 {
|
||||
serverAddr = "http://localhost:2379"
|
||||
}
|
||||
file {
|
||||
name = "file:/root/seata-config/file.conf"
|
||||
}
|
||||
}
|
||||
BIN
orange-demo-service/zz-resource/upload-files/.DS_Store
vendored
Normal file
BIN
orange-demo-service/zz-resource/upload-files/.DS_Store
vendored
Normal file
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 204 KiB |
Reference in New Issue
Block a user