Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flink_warehouse_rt
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
data
flink_warehouse_rt
Commits
2d9560d2
Commit
2d9560d2
authored
May 25, 2020
by
刘喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cehckpoint config
parent
f0cfcaa1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
PreciseExposureStreaming.java
...ain/java/com/gmei/streaming/PreciseExposureStreaming.java
+11
-8
No files found.
ml_c_et_pe_preciseexposure_dimen_d_rt/src/main/java/com/gmei/streaming/PreciseExposureStreaming.java
View file @
2d9560d2
...
...
@@ -97,24 +97,27 @@ public class PreciseExposureStreaming {
/*
checkpoint设置
*/
//start a checkpoint every 300000 ms(时间设置太短导致checkout还未完成就已超时,目前设置为5分钟)
env
.
enableCheckpointing
(
300000
);
//设置statebackend(默认为true)
env
.
setStateBackend
(
new
FsStateBackend
(
checkpointPath
,
true
));
//重试次数1,重试间隔时间30s
env
.
setRestartStrategy
(
RestartStrategies
.
fixedDelayRestart
(
1
,
3000
));
//set mode to exactly-once (this is the default)
env
.
getCheckpointConfig
().
setCheckpointingMode
(
CheckpointingMode
.
EXACTLY_ONCE
);
//
env.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE);
//make sure 500 ms of progress happen between checkpoints
env
.
getCheckpointConfig
().
setMinPauseBetweenCheckpoints
(
500
);
//checkpoints have to complete within one minute, or are discarded
env
.
getCheckpointConfig
().
setCheckpointTimeout
(
6
0000
);
env
.
getCheckpointConfig
().
setCheckpointTimeout
(
18
0000
);
//allow only one checkpoint to be in progress at the same time
env
.
getCheckpointConfig
().
setMaxConcurrentCheckpoints
(
1
);
//
env.getCheckpointConfig().setMaxConcurrentCheckpoints(1);
//enable externalized checkpoints which are retained after job cancellation
env
.
getCheckpointConfig
().
enableExternalizedCheckpoints
(
CheckpointConfig
.
ExternalizedCheckpointCleanup
.
RETAIN_ON_CANCELLATION
);
//This determines if a task will be failed if an error occurs in the execution of the task’s checkpoint procedure.
env
.
getCheckpointConfig
().
setFailOnCheckpointingErrors
(
true
);
//设置statebackend
env
.
setStateBackend
(
new
FsStateBackend
(
checkpointPath
,
true
));
//重试次数1,重试间隔时间30s
env
.
setRestartStrategy
(
RestartStrategies
.
fixedDelayRestart
(
1
,
3000
));
// env.getCheckpointConfig().setFailOnCheckpointingErrors(true);
//设置时间属性(EventTime:事件时间;IngestionTime:接入时间;ProcessingTime:处理时间(默认))
env
.
setStreamTimeCharacteristic
(
TimeCharacteristic
.
ProcessingTime
);
...
...
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