Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flink-monitor
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
赵建伟
flink-monitor
Commits
7685d59a
Commit
7685d59a
authored
Mar 20, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
ac1be1bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
PortraitMonitorMain.java
src/main/java/com/gmei/data/monitor/PortraitMonitorMain.java
+5
-5
No files found.
src/main/java/com/gmei/data/monitor/PortraitMonitorMain.java
View file @
7685d59a
...
@@ -50,11 +50,11 @@ public class PortraitMonitorMain {
...
@@ -50,11 +50,11 @@ public class PortraitMonitorMain {
// 获得流处理环境对象
// 获得流处理环境对象
StreamExecutionEnvironment
env
=
StreamExecutionEnvironment
.
getExecutionEnvironment
();
StreamExecutionEnvironment
env
=
StreamExecutionEnvironment
.
getExecutionEnvironment
();
env
.
setStreamTimeCharacteristic
(
TimeCharacteristic
.
EventTime
);
env
.
setStreamTimeCharacteristic
(
TimeCharacteristic
.
EventTime
);
//
env.enableCheckpointing(1000);
env
.
enableCheckpointing
(
1000
);
//
env.setStateBackend(new FsStateBackend(checkpointPath));
env
.
setStateBackend
(
new
FsStateBackend
(
checkpointPath
));
//
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(1, 3000));
env
.
setRestartStrategy
(
RestartStrategies
.
fixedDelayRestart
(
1
,
3000
));
//
CheckpointConfig config = env.getCheckpointConfig();
CheckpointConfig
config
=
env
.
getCheckpointConfig
();
//
config.enableExternalizedCheckpoints(CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION);
config
.
enableExternalizedCheckpoints
(
CheckpointConfig
.
ExternalizedCheckpointCleanup
.
RETAIN_ON_CANCELLATION
);
// 获取数据源
// 获取数据源
DataStream
portraitErrDataStream
=
new
PortraitKafkaSource
(
DataStream
portraitErrDataStream
=
new
PortraitKafkaSource
(
...
...
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