diff --git a/flink-2-hbase/src/main/java/com/demo/map/UserHistoryWithInterestMapFunction.java b/flink-2-hbase/src/main/java/com/demo/map/UserHistoryWithInterestMapFunction.java index 9b0c4c9..01a6a2e 100644 --- a/flink-2-hbase/src/main/java/com/demo/map/UserHistoryWithInterestMapFunction.java +++ b/flink-2-hbase/src/main/java/com/demo/map/UserHistoryWithInterestMapFunction.java @@ -38,6 +38,7 @@ public String map(LogEntity logEntity) throws Exception { int times = 1; // 如果用户没有操作 则为state创建值 if (actionLastTime == null) { + state.update(actionThisTime); actionLastTime = actionThisTime; saveToHBase(logEntity, 1); }else{