Authored by Gino Zhang

consumer打印每天请求conversion的关键字

... ... @@ -105,6 +105,20 @@ public class IncrementCrawlerFlow implements RetryBusinessFlow {
this.validKeywordList = keywordSet.parallelStream().filter(keyword -> validKeyword(keyword)).collect(Collectors.toList());
logger.info("[func=IncrementCrawlerFlow.init][validKeywordListSize={}]", validKeywordList != null ? validKeywordList.size() : 0);
REPORT_LOGGER.info("[key=ValidKeywordList][validIncrementKeywords={}]", validKeywordList);
reportSuggestConversionRequestKeywords();
}
private void reportSuggestConversionRequestKeywords() {
if (REPORT_LOGGER.isInfoEnabled()) {
List<String> resultList = new ArrayList<>(10000);
Set<ZSetOperations.TypedTuple<String>> redisResults = yhNoSyncZSetOperations.reverseRangeWithScores(RedisKeys.getRedisKey4Yesterday(RedisKeys.YOHO_SEARCH_KEYWORDS_TIPS), 0, 10000);
for (ZSetOperations.TypedTuple<String> typedTuple : redisResults) {
resultList.add(typedTuple.getValue() + "|" + typedTuple.getScore());
}
REPORT_LOGGER.info("[key=SuggestConversionRequestKeywords][suggestConversionRequestKeywords={}]", resultList);
}
}
private boolean validKeyword(String keyword) {
... ...