|
@@ -2,13 +2,10 @@ package com.tzld.piaoquan.recommend.server.common.base;
|
|
|
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.tzld.piaoquan.recommend.feature.domain.video.base.ItemFeature;
|
|
|
-import com.tzld.piaoquan.recommend.server.framework.candidiate.CandidateInfo;
|
|
|
import com.tzld.piaoquan.recommend.server.model.Video;
|
|
|
import lombok.Data;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@@ -39,12 +36,6 @@ public class RankItem implements Comparable<RankItem> {
|
|
|
|
|
|
|
|
|
private String queue;
|
|
|
- private CandidateInfo candidateInfo;
|
|
|
- private List<CandidateInfo> candidateInfoList = new ArrayList<>();
|
|
|
-
|
|
|
-
|
|
|
- private List<String> mergeQueuePath = new ArrayList<>();
|
|
|
- private List<String> mergeDecisionLabels = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
@@ -86,23 +77,6 @@ public class RankItem implements Comparable<RankItem> {
|
|
|
this.scoreStr = other.scoreStr;
|
|
|
this.video = other.video;
|
|
|
|
|
|
-
|
|
|
- this.queue = other.queue;
|
|
|
- if (other.getMergeQueuePath() != null)
|
|
|
- this.mergeQueuePath.addAll(other.getMergeQueuePath());
|
|
|
- if (other.getMergeDecisionLabels() != null)
|
|
|
- this.mergeDecisionLabels.addAll(other.getMergeDecisionLabels());
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- this.candidateInfo = other.getCandidateInfo() != null ? other.getCandidateInfo().deepcopy() : null;
|
|
|
- if (other.getCandidateInfoList() != null) {
|
|
|
- for (CandidateInfo tmpCandidateInfo : other.getCandidateInfoList()) {
|
|
|
- this.candidateInfoList.add(tmpCandidateInfo.deepcopy());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -120,36 +94,4 @@ public class RankItem implements Comparable<RankItem> {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public RankItem deepcopy() {
|
|
|
- return new RankItem(this);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public void addToCandidateInfoList(CandidateInfo candidateInfo) {
|
|
|
- this.candidateInfoList.add(candidateInfo);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public void addMergeQueuePath(String mergeQueueName) {
|
|
|
- this.mergeQueuePath.add(mergeQueueName);
|
|
|
- }
|
|
|
-
|
|
|
- public void addMergeDecisionLabel(String label) {
|
|
|
- this.mergeDecisionLabels.add(label);
|
|
|
- }
|
|
|
-
|
|
|
- public void putRankerScore(String rankerName, Double rankerScore) {
|
|
|
- this.rankerScore.put(rankerName, rankerScore);
|
|
|
- }
|
|
|
-
|
|
|
- public String getLastMergeQueueName() {
|
|
|
- int pathSize = this.mergeQueuePath.size();
|
|
|
- if (pathSize > 0) {
|
|
|
- return this.mergeQueuePath.get(pathSize - 1);
|
|
|
- } else {
|
|
|
- return getCandidateInfo().getCandidateQueueName();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
}
|