|
@@ -1,5 +1,6 @@
|
|
|
package com.tzld.piaoquan.recommend.server.service.recall.strategy;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.tzld.piaoquan.recommend.server.model.Video;
|
|
|
import com.tzld.piaoquan.recommend.server.service.filter.FilterParam;
|
|
@@ -48,10 +49,15 @@ public class RegionRealtimeRecallStrategyV3 implements RecallStrategy {
|
|
|
for (Pair<Long, Double> v: result){
|
|
|
videoMap.put(v.getLeft(), v.getRight());
|
|
|
}
|
|
|
-
|
|
|
+ long t1 = new Long(System.currentTimeMillis());
|
|
|
FilterParam filterParam = FilterParamFactory.create(param, Lists.newArrayList(videoMap.keySet()));
|
|
|
filterParam.setForceTruncation(10000);
|
|
|
FilterResult filterResult = filterService.filter(filterParam);
|
|
|
+ long t2 = new Long(System.currentTimeMillis());
|
|
|
+ JSONObject obj = new JSONObject();
|
|
|
+ obj.put("name", "RegionRealtimeRecallStrategyV3");
|
|
|
+ obj.put("filter_time", t2-t1);
|
|
|
+ log.info(obj.toString());
|
|
|
List<Video> videosResult = new ArrayList<>();
|
|
|
if (filterResult != null && CollectionUtils.isNotEmpty(filterResult.getVideoIds())) {
|
|
|
filterResult.getVideoIds().stream().forEach(vid -> {
|