Commit 811d502b by 黄准

车道指标相关计算逻辑

parent 5ddf6655
...@@ -185,7 +185,7 @@ public class LaneNormProcessFunction extends KeyedCoProcessFunction<String, Cycl ...@@ -185,7 +185,7 @@ public class LaneNormProcessFunction extends KeyedCoProcessFunction<String, Cycl
@Override @Override
public void onTimer(long timestamp, OnTimerContext ctx, Collector<List<LaneNorm>> out) throws Exception { public void onTimer(long timestamp, OnTimerContext ctx, Collector<List<LaneNorm>> out) throws Exception {
super.onTimer(timestamp, ctx, out); super.onTimer(timestamp, ctx, out);
System.out.println("触发定时器了。。。。"); //System.out.println("触发定时器了。。。。");
//通过定时器清空字典表 防止字典表数据有更新 //通过定时器清空字典表 防止字典表数据有更新
dict.remove("phaseDirection"); dict.remove("phaseDirection");
dict.remove("laneList"); dict.remove("laneList");
......
...@@ -49,14 +49,14 @@ public class LaneNormJob { ...@@ -49,14 +49,14 @@ public class LaneNormJob {
public Cycle map(String cycle) throws Exception { public Cycle map(String cycle) throws Exception {
Cycle cycle1 = JSON.parseObject(cycle, Cycle.class); Cycle cycle1 = JSON.parseObject(cycle, Cycle.class);
cycle1 = getCycle(cycle1); cycle1 = getCycle(cycle1);
System.out.println("周期数据->"+cycle); //System.out.println("周期数据->"+cycle);
return cycle1; return cycle1;
} }
}; };
MapFunction<String, TravelEvent> getTravelEventFunction = new MapFunction<String, TravelEvent>() { MapFunction<String, TravelEvent> getTravelEventFunction = new MapFunction<String, TravelEvent>() {
@Override @Override
public TravelEvent map(String travelEvent) throws Exception { public TravelEvent map(String travelEvent) throws Exception {
System.out.println("旅行事件数据->"+travelEvent); //System.out.println("旅行事件数据->"+travelEvent);
return JSON.parseObject(travelEvent, TravelEvent.class); return JSON.parseObject(travelEvent, TravelEvent.class);
} }
}; };
......
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