Authored by Gino Zhang

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

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