|
@@ -75,8 +75,6 @@ public class FlowPoolService {
|
|
|
asyncDelDistributeCount(videoFlowPoolMap, (appType, level, values) -> {
|
|
|
String key = String.format(KEY_WITH_LEVEL_FORMAT, appType, level);
|
|
|
Long count = redisTemplate.opsForSet().remove(key, values);
|
|
|
- log.info("asyncDelDistributeCountWithLevel remove key={}, values={}, count={}",
|
|
|
- key, JSONUtils.toJson(values), count);
|
|
|
redisTemplate.opsForSet().remove(String.format(KEY_QUICK_WITH_LEVEL_FORMAT, appType), values);
|
|
|
});
|
|
|
}
|
|
@@ -111,9 +109,7 @@ public class FlowPoolService {
|
|
|
private void asyncLocalDistributeCountWithLevelScore(Map<Long, String> videoFlowPoolMap) {
|
|
|
asyncDelDistributeCount(videoFlowPoolMap, (appType, level, values) -> {
|
|
|
String key = String.format(KEY_WITH_LEVEL_SCORE_FORMAT, appType, level);
|
|
|
- Long count = redisTemplate.opsForZSet().remove(key, values);
|
|
|
- log.info("asyncLocalDistributeCountWithLevelScore remove key={}, values={}, count={}",
|
|
|
- key, JSONUtils.toJson(values), count);
|
|
|
+ redisTemplate.opsForZSet().remove(key, values);
|
|
|
redisTemplate.opsForZSet().remove(String.format(KEY_QUICK_WITH_LEVEL_SCORE_FORMAT, appType), values);
|
|
|
});
|
|
|
}
|
|
@@ -146,8 +142,6 @@ public class FlowPoolService {
|
|
|
asyncDelDistributeCount(videoFlowPoolMap, (appType, level, values) -> {
|
|
|
String key = String.format(KEY_WITH_SCORE_FORMAT, appType, level);
|
|
|
Long count = redisTemplate.opsForZSet().remove(key, values);
|
|
|
- log.info("asyncDelDistributeCountWithScore remove key={}, values={}, count={}",
|
|
|
- key, JSONUtils.toJson(values), count);
|
|
|
|
|
|
redisTemplate.opsForZSet().remove(String.format(KEY_QUICK_WITH_SCORE_FORMAT, appType), values);
|
|
|
});
|
|
@@ -163,8 +157,6 @@ public class FlowPoolService {
|
|
|
.map(v -> String.format(localDistributeCountFormat, v.getKey(), v.getValue()))
|
|
|
.collect(Collectors.toList());
|
|
|
List<String> counts = redisTemplate.opsForValue().multiGet(keys);
|
|
|
- log.info("getDistributeCount localDistributeCountKeys={}, counts={}", JSONUtils.toJson(keys),
|
|
|
- JSONUtils.toJson(counts));
|
|
|
Map<Long, Integer> result = new HashMap<>();
|
|
|
for (int i = 0; i < entries.size(); i++) {
|
|
|
result.put(entries.get(i).getKey(), NumberUtils.toInt(counts.get(i), 0));
|
|
@@ -194,7 +186,6 @@ public class FlowPoolService {
|
|
|
List<String> keys = videoFlowPoolMap.entrySet().stream()
|
|
|
.map(v -> String.format(localDistributeCountFormat, v.getKey(), v.getValue()))
|
|
|
.collect(Collectors.toList());
|
|
|
- log.info("asyncDelDistributeCount localDistributeCountKey={}", JSONUtils.toJson(keys));
|
|
|
redisTemplate.delete(keys);
|
|
|
|
|
|
Map<String, Double> levelWeight = flowPoolConfigService.getLevelWeight();
|