Explorar o código

remoce flowpool abtest logic

丁云鹏 hai 3 meses
pai
achega
8615c3dfd6

+ 0 - 1
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/filter/strategy/AllowListStrategy.java

@@ -47,7 +47,6 @@ public class AllowListStrategy implements FilterStrategy {
             });
 
     private static final String VIDEO_ALLOW_LIST_BITMAP_KEY_SET_PREFIX = "movie:videoid:allowSet:";
-    private static final String RELIGION_VIDEO_ALLOW_LIST_BITMAP_KEY = "mp:religion:allowlist:videoid:bitmap";
 
 
     @PostConstruct

+ 2 - 5
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/recall/strategy/AbstractFlowPoolWithLevelRecallStrategy.java

@@ -15,10 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.data.redis.core.RedisTemplate;
 
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @author dyp
@@ -41,7 +38,7 @@ public abstract class AbstractFlowPoolWithLevelRecallStrategy implements RecallS
         List<Video> results = new ArrayList<>();
         List<String> data = redisTemplate.opsForSet().randomMembers(flowPoolKey, getSize);
         if (CollectionUtils.isEmpty(data)) {
-            return null;
+            return Collections.emptyList();
         }
         Map<Long, String> videoFlowPoolMap = new LinkedHashMap<>();
         for (String value : data) {

+ 0 - 2
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/recall/strategy/AbstractRegionRecallStrategy.java

@@ -1,6 +1,5 @@
 package com.tzld.piaoquan.recommend.server.service.recall.strategy;
 
-import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
 import com.google.common.collect.Lists;
 import com.google.common.reflect.TypeToken;
 import com.tzld.piaoquan.recommend.server.model.Video;
@@ -19,7 +18,6 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.math.NumberUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.core.ZSetOperations;
 

+ 1 - 1
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/recall/strategy/AbstractVideoRecallStrategy.java

@@ -46,7 +46,7 @@ public abstract class AbstractVideoRecallStrategy implements RecallStrategy {
         // [[16687915, 0.5], [16528093, 0.5]]
         String value = redisTemplate.opsForValue().get(recall_key);
         if (StringUtils.isBlank(value)) {
-            return null;
+            return Collections.emptyList();
         }
         List<List<String>> videoScores = JSONUtils.fromJson(value, new TypeToken<List<List<String>>>() {
         }, Collections.emptyList());

+ 0 - 1
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/score4recall/model4recall/AbstractModel.java

@@ -1,7 +1,6 @@
 package com.tzld.piaoquan.recommend.server.service.score4recall.model4recall;
 
 
-import java.util.List;
 import com.tzld.piaoquan.recommend.server.service.score.model.Model;
 
 abstract public class AbstractModel extends Model {