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
3ed21345
Commit
3ed21345
authored
Mar 19, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
f18f645a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
13 deletions
+23
-13
start.sh
bin/start.sh
+1
-1
GmPortraitResult.java
...ain/java/com/gmei/data/monitor/bean/GmPortraitResult.java
+19
-10
PortraitMonitorSucOperator.java
...mei/data/monitor/operator/PortraitMonitorSucOperator.java
+3
-2
No files found.
bin/start.sh
View file @
3ed21345
...
...
@@ -7,7 +7,7 @@ export JAVA_OPTS="-Xms1024m -Xmx8192m -XX:-UseGCOverheadLimit -XX:+UseConcMarkSw
$FLINK_HOME
/bin/flink run
\
-m
yarn-cluster
\
-ynm
portrait
_
monitor
\
-ynm
portrait
-
monitor
\
-yqu
flink
\
-yn
2
\
-ys
2
\
...
...
src/main/java/com/gmei/data/monitor/bean/GmPortraitResult.java
View file @
3ed21345
...
...
@@ -15,9 +15,10 @@ public class GmPortraitResult {
* event_cn : 搜索操作/点击卡片/kyc/ai测脸 等
*/
private
String
device_id
;
private
String
log_time
;
private
String
event_cn
;
private
String
action
;
private
String
log_time
;
private
String
event
;
private
Boolean
new_portrait
;
public
String
getDevice_id
()
{
return
device_id
;
...
...
@@ -35,14 +36,6 @@ public class GmPortraitResult {
this
.
log_time
=
log_time
;
}
public
String
getEvent_cn
()
{
return
event_cn
;
}
public
void
setEvent_cn
(
String
event_cn
)
{
this
.
event_cn
=
event_cn
;
}
public
String
getAction
()
{
return
action
;
}
...
...
@@ -50,4 +43,20 @@ public class GmPortraitResult {
public
void
setAction
(
String
action
)
{
this
.
action
=
action
;
}
public
String
getEvent
()
{
return
event
;
}
public
void
setEvent
(
String
event
)
{
this
.
event
=
event
;
}
public
Boolean
getNew_portrait
()
{
return
new_portrait
;
}
public
void
setNew_portrait
(
Boolean
new_portrait
)
{
this
.
new_portrait
=
new_portrait
;
}
}
src/main/java/com/gmei/data/monitor/operator/PortraitMonitorSucOperator.java
View file @
3ed21345
...
...
@@ -64,13 +64,14 @@ public class PortraitMonitorSucOperator implements BaseOperator{
.
filter
(
new
FilterFunction
<
GmPortraitResult
>()
{
@Override
public
boolean
filter
(
GmPortraitResult
value
)
throws
Exception
{
if
(
null
==
value
.
getAction
()
||
null
==
value
.
getDevice_id
()
||
null
==
value
.
getLog_time
()){
if
(
null
==
value
.
getAction
()
||
null
==
value
.
getDevice_id
()
||
null
==
value
.
getLog_time
()
||
null
==
value
.
getEvent
()){
return
false
;
}
return
true
;
}
})
.
keyBy
(
"
action
"
)
.
keyBy
(
"
event
"
)
.
timeWindow
(
Time
.
seconds
(
windownSize
),
Time
.
seconds
(
slideSize
))
.
process
(
new
ProcessWindowFunction
<
GmPortraitResult
,
TblMonitorPortraitSuc
,
Tuple
,
TimeWindow
>()
{
@Override
...
...
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