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
fba1845d
Commit
fba1845d
authored
Mar 25, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
f2cd3caa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
22 deletions
+17
-22
PortraitMonitorMain.java
src/main/java/com/gmei/data/monitor/PortraitMonitorMain.java
+12
-12
PortraitMonitorShdOperator.java
...mei/data/monitor/operator/PortraitMonitorShdOperator.java
+5
-10
No files found.
src/main/java/com/gmei/data/monitor/PortraitMonitorMain.java
View file @
fba1845d
...
...
@@ -58,17 +58,17 @@ public class PortraitMonitorMain {
config
.
enableExternalizedCheckpoints
(
CheckpointConfig
.
ExternalizedCheckpointCleanup
.
RETAIN_ON_CANCELLATION
);
// 获取数据源
DataStream
portraitErrDataStream
=
new
PortraitKafkaSource
(
env
,
inBrokers
,
maidianInTopic
,
backendInTopic
,
portraitErrGroupId
,
batchSize
,
isStartFromEarliest
,
isStartFromLatest
,
startTime
).
getInstance
();
//
DataStream portraitErrDataStream = new PortraitKafkaSource(
//
env,
//
inBrokers,
//
maidianInTopic,
//
backendInTopic,
//
portraitErrGroupId,
//
batchSize,
//
isStartFromEarliest,
//
isStartFromLatest,
//
startTime
//
).getInstance();
DataStream
portraitShdDataStream
=
new
PortraitKafkaSource
(
env
,
inBrokers
,
...
...
@@ -92,7 +92,7 @@ public class PortraitMonitorMain {
).
getInstance
();
// 执行处理核心逻辑
new
PortraitMonitorErrOperator
(
portraitErrDataStream
,
outJdbcUrl
,
maxRetry
,
retryInteral
,
parallelism
).
run
();
//
new PortraitMonitorErrOperator(portraitErrDataStream,outJdbcUrl,maxRetry,retryInteral,parallelism).run();
new
PortraitMonitorShdOperator
(
portraitShdDataStream
,
windowSize
,
slideSize
,
outJdbcUrl
,
maxRetry
,
retryInteral
,
parallelism
).
run
();
new
PortraitMonitorSucOperator
(
portraitSucDataStream
,
windowSize
,
slideSize
,
outJdbcUrl
,
maxRetry
,
retryInteral
,
parallelism
).
run
();
...
...
src/main/java/com/gmei/data/monitor/operator/PortraitMonitorShdOperator.java
View file @
fba1845d
...
...
@@ -69,16 +69,11 @@ public class PortraitMonitorShdOperator implements BaseOperator{
if
(
StringUtils
.
isNotBlank
(
maidianEventTime
))
{
logTime
=
Long
.
valueOf
(
maidianEventTime
)
*
1000
;
}
String
backendEventTime
=
jsonObject
.
getString
(
"TIME"
);
if
(
StringUtils
.
isNotBlank
(
backendEventTime
))
{
try
{
logTime
=
dateTimeFormat
.
parseMillis
(
backendEventTime
);
}
catch
(
IllegalArgumentException
e
)
{
try
{
logTime
=
dateTimeNoMillisFormat
.
parseMillis
(
backendEventTime
);
}
catch
(
IllegalArgumentException
e2
)
{
e2
.
printStackTrace
();
}
JSONObject
appObject
=
jsonObject
.
getJSONObject
(
"APP"
);
if
(
null
!=
appObject
)
{
Long
time
=
appObject
.
getLong
(
"time"
);
if
(
null
!=
time
&&
time
!=
0
){
logTime
=
time
;
}
}
return
logTime
;
...
...
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