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
13864593
Commit
13864593
authored
Mar 20, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
084528ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
PortraitMonitorSucOperator.java
...mei/data/monitor/operator/PortraitMonitorSucOperator.java
+8
-2
No files found.
src/main/java/com/gmei/data/monitor/operator/PortraitMonitorSucOperator.java
View file @
13864593
...
...
@@ -48,11 +48,17 @@ public class PortraitMonitorSucOperator implements BaseOperator{
@Override
public
void
run
()
{
SingleOutputStreamOperator
map
=
dataStream
.
assignTimestampsAndWatermarks
(
new
AscendingTimestampExtractor
<
String
>()
{
SingleOutputStreamOperator
map
=
dataStream
.
filter
(
new
FilterFunction
<
String
>()
{
@Override
public
boolean
filter
(
String
value
)
throws
Exception
{
return
JSON
.
isValid
(
value
);
}
}).
assignTimestampsAndWatermarks
(
new
AscendingTimestampExtractor
<
String
>()
{
@Override
public
long
extractAscendingTimestamp
(
String
element
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
element
);
Long
dateTime
=
jsonObject
.
getLong
(
"log_time"
);
String
dateTimeStr
=
jsonObject
.
getString
(
"log_time"
);
long
dateTime
=
Math
.
round
(
Double
.
valueOf
(
dateTimeStr
));
return
dateTime
;
}
}).
map
(
new
MapFunction
<
String
,
GmPortraitResult
>()
{
...
...
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