Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-dsc-flink
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shezaixing
dsk-dsc-flink
Commits
73259a30
Commit
73259a30
authored
Mar 20, 2025
by
liaowenwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改kafka连接
parent
0a0fd085
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
MysqlDataTransferSinkBatch.java
...dsk/flink/dsc/common/sink/MysqlDataTransferSinkBatch.java
+2
-2
EtlUtils.java
src/main/java/com/dsk/flink/dsc/utils/EtlUtils.java
+1
-1
No files found.
src/main/java/com/dsk/flink/dsc/common/sink/MysqlDataTransferSinkBatch.java
View file @
73259a30
...
...
@@ -30,7 +30,7 @@ public class MysqlDataTransferSinkBatch extends RichSinkFunction<String> {
EnvProperties
envProps
;
private
static
transient
ExecutorService
executorService
;
private
static
transient
DruidDataSource
dataSource
;
private
static
final
int
BATCH_SIZE
=
20
00
;
private
static
final
int
BATCH_SIZE
=
5
00
;
private
static
final
int
FLUSH_INTERVAL
=
500
;
private
static
final
int
INIT_CAPACITY
=
(
int
)(
BATCH_SIZE
/
0.75
+
1
);
private
ArrayBlockingQueue
<
String
>
sqlBatch
=
new
ArrayBlockingQueue
<>(
BATCH_SIZE
*
2
);
...
...
@@ -43,7 +43,7 @@ public class MysqlDataTransferSinkBatch extends RichSinkFunction<String> {
@Override
public
void
open
(
Configuration
parameters
)
throws
Exception
{
executorService
=
new
ThreadPoolExecutor
(
15
,
20
,
20
,
TimeUnit
.
MINUTES
,
new
ArrayBlockingQueue
<>(
1000
));
executorService
=
new
ThreadPoolExecutor
(
4
,
4
,
20
,
TimeUnit
.
MINUTES
,
new
ArrayBlockingQueue
<>(
1000
));
// 初始化获取配置
String
configTidbUrl
=
String
.
format
(
envProps
.
getDb_url
(),
envProps
.
getDb_host
(),
envProps
.
getDb_port
(),
envProps
.
getDb_database
());
dataSource
=
new
DruidDataSource
();
...
...
src/main/java/com/dsk/flink/dsc/utils/EtlUtils.java
View file @
73259a30
...
...
@@ -15,7 +15,7 @@ public class EtlUtils {
properties
.
setProperty
(
"auto.offset.reset"
,
"earliest"
);
properties
.
setProperty
(
"sasl.jaas.config"
,
getSaslJaasConfig
(
username
,
password
));
properties
.
setProperty
(
"security.protocol"
,
"SASL_PLAINTEXT"
);
properties
.
setProperty
(
"sasl.mechanism"
,
"SCRAM-SHA-
512
"
);
properties
.
setProperty
(
"sasl.mechanism"
,
"SCRAM-SHA-
256
"
);
properties
.
setProperty
(
"fetch.max.bytes"
,
"1048576"
);
//1M
properties
.
setProperty
(
"flink.consumer.max.fetch.size"
,
"524288"
);
//512k
properties
.
setProperty
(
"session.timeout.ms"
,
"30000"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment