|
|
@@ -78,21 +78,6 @@ public class LogHubServiceImpl implements LogHubService {
|
|
|
json.put("score", rankItem.getScore());
|
|
|
rankItem.getScoreMap().put("score", rankItem.getScore());
|
|
|
json.put("scoremap", rankItem.getScoreMap());
|
|
|
- JSONObject featureJson = new JSONObject();
|
|
|
- for (Map.Entry<String, String> entry : rankItem.getFeatureMap().entrySet()) {
|
|
|
- if (FEATURE_FIELD_SET.contains(entry.getKey())) {
|
|
|
- featureJson.put(entry.getKey(), entry.getValue());
|
|
|
- }
|
|
|
- }
|
|
|
- for (Map.Entry<String, Map<String, String>> entry : rankItem.getMetaFeatureMap().entrySet()) {
|
|
|
- if (FEATURE_FIELD_SET.contains(entry.getKey())) {
|
|
|
- featureJson.put(entry.getKey(), entry.getValue());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (MapUtils.isNotEmpty(featureJson)) {
|
|
|
- json.put("allfeature", featureJson);
|
|
|
- }
|
|
|
scoreResult.add(json);
|
|
|
}
|
|
|
|
|
|
@@ -111,9 +96,18 @@ public class LogHubServiceImpl implements LogHubService {
|
|
|
|
|
|
top1.getScoreMap().put("score", top1.getScore());
|
|
|
logMap.put("scoremap", JSON.toJSONString(top1.getScoreMap()));
|
|
|
- logMap.put("allfeature", JSON.toJSONString(top1.getFeatureMap()));
|
|
|
+ // logMap.put("allfeature", JSON.toJSONString(top1.getFeatureMap()));
|
|
|
logMap.put("metafeature", JSON.toJSONString(top1.getMetaFeatureMap()));
|
|
|
|
|
|
+ long featureTableSize = 0;
|
|
|
+ if (MapUtils.isNotEmpty(top1.getMetaFeatureMap())) {
|
|
|
+ featureTableSize = top1.getMetaFeatureMap().entrySet()
|
|
|
+ .stream()
|
|
|
+ .filter(e -> MapUtils.isNotEmpty(e.getValue()))
|
|
|
+ .count();
|
|
|
+ }
|
|
|
+ logMap.put("featuretablesize", featureTableSize);
|
|
|
+
|
|
|
aliyunLogManager.sendLog(project, scoreStatisticsLogStore, "", logMap);
|
|
|
}
|
|
|
});
|