Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
bigdata_analysis_recommend
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
总经办-KinPeng-金鹏
bigdata_analysis_recommend
Commits
1861a0d6
提交
1861a0d6
authored
9月 14, 2021
作者:
peji
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
7e58c042
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
361 行增加
和
0 行删除
+361
-0
pom.xml
pom.xml
+212
-0
BigdataConnectorsApplication.java
...ava/cn/com/acadsoc/core/BigdataConnectorsApplication.java
+24
-0
TextbookShuntLog.java
...main/java/cn/com/acadsoc/core/model/TextbookShuntLog.java
+16
-0
application.yml
src/main/resources/application.yml
+40
-0
logback-spring.xml
src/main/resources/logback-spring.xml
+69
-0
没有找到文件。
pom.xml
0 → 100644
浏览文件 @
1861a0d6
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.4.3
</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<groupId>
cn.com.acadsoc.core
</groupId>
<artifactId>
cdc-connectors
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<name>
bigdata_analysis_recommend
</name>
<description>
bigdata_analysis_recommend
</description>
<repositories>
<!-- 代码库 -->
<repository>
<id>
cloudera-releases
</id>
<url>
https://repository.cloudera.com/artifactory/cloudera-repos
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</repository>
</repositories>
<properties>
<guava.version>
30.1.1-jre
</guava.version>
<sentinel.version>
1.8.2
</sentinel.version>
<skipTests>
true
</skipTests>
</properties>
<dependencies>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpcore
</artifactId>
<version>
4.4.6
</version>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
<version>
4.4
</version>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpmime
</artifactId>
<version>
4.4
</version>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
fluent-hc
</artifactId>
<version>
4.4
</version>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
<version>
1.7.9
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-undertow
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-jdbc
</artifactId>
</dependency>
<dependency>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
<version>
${guava.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.kafka
</groupId>
<artifactId>
kafka-clients
</artifactId>
<version>
2.2.1-cdh6.3.2
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-pool2 -->
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-pool2
</artifactId>
<version>
2.9.0
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.75
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.47
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid
</artifactId>
<version>
1.2.3
</version>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<version>
3.11
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.logstash.logback/logstash-logback-encoder -->
<dependency>
<groupId>
net.logstash.logback
</groupId>
<artifactId>
logstash-logback-encoder
</artifactId>
<version>
6.6
</version>
</dependency>
<dependency>
<groupId>
com.alibaba.csp
</groupId>
<artifactId>
sentinel-core
</artifactId>
<version>
${sentinel.version}
</version>
</dependency>
<dependency>
<groupId>
com.alibaba.csp
</groupId>
<artifactId>
sentinel-annotation-aspectj
</artifactId>
<version>
${sentinel.version}
</version>
</dependency>
<dependency>
<groupId>
com.alibaba.csp
</groupId>
<artifactId>
sentinel-transport-simple-http
</artifactId>
<version>
${sentinel.version}
</version>
</dependency>
<dependency>
<groupId>
com.microsoft.sqlserver
</groupId>
<artifactId>
mssql-jdbc
</artifactId>
<version>
8.4.1.jre8
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<mainClass>
cn.com.acadsoc.core.BigdataConnectorsApplication
</mainClass>
<layout>
ZIP
</layout>
<includes>
<include>
<groupId>
nothing
</groupId>
<artifactId>
nothing
</artifactId>
</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
src/main/java/cn/com/acadsoc/core/BigdataConnectorsApplication.java
0 → 100644
浏览文件 @
1861a0d6
package
cn
.
com
.
acadsoc
.
core
;
import
com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.scheduling.annotation.EnableAsync
;
@SpringBootApplication
@EnableAsync
public
class
BigdataConnectorsApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
BigdataConnectorsApplication
.
class
,
args
);
}
// 注解支持的配置Bean
@Bean
public
SentinelResourceAspect
sentinelResourceAspect
()
{
return
new
SentinelResourceAspect
();
}
}
src/main/java/cn/com/acadsoc/core/model/TextbookShuntLog.java
0 → 100644
浏览文件 @
1861a0d6
package
cn
.
com
.
acadsoc
.
core
.
model
;
public
class
TextbookShuntLog
{
private
String
uid
;
private
String
source_type_name
;
private
String
userLevel
;
private
String
grade
;
//用户兴趣
private
String
first_allocation_time
;
//试课
private
String
first_trial_time
;
//约课
private
String
catid
;
//推荐教材ID
private
String
sid
;
//推荐课件ID
}
src/main/resources/application.yml
0 → 100644
浏览文件 @
1861a0d6
server
:
port
:
${port:8085}
maxHttpHeaderSize
:
102400000
undertow
:
buffer-size
:
${undertow.buffer-size:1024}
direct-buffers
:
${undertow.direct-buffers:
true
}
threads
:
io
:
${undertow.io-threads:32}
worker
:
${undertow.worker-threads:2048}
spring
:
datasource
:
url
:
'
${dorisDatasource.url:jdbc:mysql://192.168.0.63:9030/dm}?useUnicode=true&characterEncoding=UTF-8&tinyInt1isBit=false'
username
:
${dorisDatasource.username:HadoopETL}
password
:
'
${dorisDatasource.password:acadsoc2020}'
driver-class-name
:
com.mysql.jdbc.Driver
type
:
com.alibaba.druid.pool.DruidDataSource
initialSize
:
20
minIdle
:
5
maxActive
:
50
maxWait
:
60000
timeBetweenEvictionRunsMillis
:
60000
minEvictableIdleTimeMillis
:
300000
validationQuery
:
SELECT 1
testWhileIdle
:
true
testOnBorrow
:
false
testOnReturn
:
false
poolPreparedStatements
:
true
maxPoolPreparedStatementPerConnectionSize
:
20
filters
:
stat,wall,log4j
connectionProperties
:
druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat
:
true
logging
:
level
:
root
:
${log-level:info}
config
:
classpath:logback-spring.xml
file
:
path
:
logs.log
src/main/resources/logback-spring.xml
0 → 100644
浏览文件 @
1861a0d6
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include
resource=
"org/springframework/boot/logging/logback/defaults.xml"
/>
<springProperty
scope=
"context"
name=
"env"
source=
"spring.profiles"
/>
<springProperty
scope=
"context"
name=
"level"
source=
"logging.level"
/>
<property
name=
"service"
value=
"cdc-connectors"
/>
<property
name=
"logfile"
value=
"/cdhdata1/acadsoc/core/bigdata_etl/jar/logs/"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
<appender
name=
"logstash"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${logfile}.log
</file>
<encoder
class=
"net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"
>
<providers>
<pattern>
<pattern>
{
"server_ip": "${MY_NODE_IP}",
"service": "${service}",
"env": "${env:-dev}",
"startTime": "%X{startTime}",
"endTime": "%X{endTime}",
"timestamp": "%date{\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\"}",
"log_level": "%level",
"thread_name": "%thread",
"message": "%logger{100} : %message",
"req_id": "%X{reqId}",
"client_ip": "%X{client_ip}",
"url": "%X{url}",
"param": "%X{param}",
"elapsed_time": "%X{elapsed_time}",
"stack_trace": "%exception{40}"
}
</pattern>
</pattern>
</providers>
</encoder>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${logfile}.log.%d{yyyy-MM-dd-HH}.%i.gz
</fileNamePattern>
<maxFileSize>
200MB
</maxFileSize>
<maxHistory>
7
</maxHistory>
</rollingPolicy>
</appender>
<!-- 异步输出 -->
<appender
name=
"async-log"
class=
"ch.qos.logback.classic.AsyncAppender"
>
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
<discardingThreshold>
0
</discardingThreshold>
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
<queueSize>
256
</queueSize>
<!-- 添加附加的appender,最多只能添加一个 -->
<appender-ref
ref=
"logstash"
/>
</appender>
<root
level=
"${level}"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"async-log"
/>
</root>
</configuration>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论