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
b77326eb
You need to sign in or sign up before continuing.
Commit
b77326eb
authored
Mar 27, 2025
by
liaowenwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改kafka连接
parent
73259a30
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
MysqlDataTransferSinkBatch.java
...dsk/flink/dsc/common/sink/MysqlDataTransferSinkBatch.java
+1
-1
SyncCustomerDataSource.java
...n/java/com/dsk/flink/dsc/sync/SyncCustomerDataSource.java
+1
-1
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 @
b77326eb
...
@@ -30,7 +30,7 @@ public class MysqlDataTransferSinkBatch extends RichSinkFunction<String> {
...
@@ -30,7 +30,7 @@ public class MysqlDataTransferSinkBatch extends RichSinkFunction<String> {
EnvProperties
envProps
;
EnvProperties
envProps
;
private
static
transient
ExecutorService
executorService
;
private
static
transient
ExecutorService
executorService
;
private
static
transient
DruidDataSource
dataSource
;
private
static
transient
DruidDataSource
dataSource
;
private
static
final
int
BATCH_SIZE
=
5
00
;
private
static
final
int
BATCH_SIZE
=
1
00
;
private
static
final
int
FLUSH_INTERVAL
=
500
;
private
static
final
int
FLUSH_INTERVAL
=
500
;
private
static
final
int
INIT_CAPACITY
=
(
int
)(
BATCH_SIZE
/
0.75
+
1
);
private
static
final
int
INIT_CAPACITY
=
(
int
)(
BATCH_SIZE
/
0.75
+
1
);
private
ArrayBlockingQueue
<
String
>
sqlBatch
=
new
ArrayBlockingQueue
<>(
BATCH_SIZE
*
2
);
private
ArrayBlockingQueue
<
String
>
sqlBatch
=
new
ArrayBlockingQueue
<>(
BATCH_SIZE
*
2
);
...
...
src/main/java/com/dsk/flink/dsc/sync/SyncCustomerDataSource.java
View file @
b77326eb
...
@@ -108,7 +108,7 @@ public class SyncCustomerDataSource {
...
@@ -108,7 +108,7 @@ public class SyncCustomerDataSource {
Collector
<
String
>
out
)
throws
Exception
{
Collector
<
String
>
out
)
throws
Exception
{
Tuple3
<
String
,
String
,
Long
>
maxTsElement
=
null
;
Tuple3
<
String
,
String
,
Long
>
maxTsElement
=
null
;
for
(
Tuple3
<
String
,
String
,
Long
>
element
:
elements
)
{
for
(
Tuple3
<
String
,
String
,
Long
>
element
:
elements
)
{
if
(
maxTsElement
==
null
||
element
.
f2
>
maxTsElement
.
f2
)
{
if
(
maxTsElement
==
null
||
element
.
f2
>
=
maxTsElement
.
f2
)
{
maxTsElement
=
element
;
maxTsElement
=
element
;
}
}
}
}
...
...
src/main/java/com/dsk/flink/dsc/utils/EtlUtils.java
View file @
b77326eb
...
@@ -15,7 +15,7 @@ public class EtlUtils {
...
@@ -15,7 +15,7 @@ public class EtlUtils {
properties
.
setProperty
(
"auto.offset.reset"
,
"earliest"
);
properties
.
setProperty
(
"auto.offset.reset"
,
"earliest"
);
properties
.
setProperty
(
"sasl.jaas.config"
,
getSaslJaasConfig
(
username
,
password
));
properties
.
setProperty
(
"sasl.jaas.config"
,
getSaslJaasConfig
(
username
,
password
));
properties
.
setProperty
(
"security.protocol"
,
"SASL_PLAINTEXT"
);
properties
.
setProperty
(
"security.protocol"
,
"SASL_PLAINTEXT"
);
properties
.
setProperty
(
"sasl.mechanism"
,
"SCRAM-SHA-
256
"
);
properties
.
setProperty
(
"sasl.mechanism"
,
"SCRAM-SHA-
512
"
);
properties
.
setProperty
(
"fetch.max.bytes"
,
"1048576"
);
//1M
properties
.
setProperty
(
"fetch.max.bytes"
,
"1048576"
);
//1M
properties
.
setProperty
(
"flink.consumer.max.fetch.size"
,
"524288"
);
//512k
properties
.
setProperty
(
"flink.consumer.max.fetch.size"
,
"524288"
);
//512k
properties
.
setProperty
(
"session.timeout.ms"
,
"30000"
);
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