Commit 3ed21345 authored by 赵建伟's avatar 赵建伟

update codes

parent f18f645a
......@@ -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 \
......
......@@ -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;
}
}
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment