|
@@ -93,7 +93,6 @@ public class RankStrategyXGBAutoUpdateModel688 extends RankStrategyXGBBasic {
|
|
|
Future<AdRankItem> future = ThreadPoolFactory.feature().submit(() -> {
|
|
|
AdRankItem adRankItem = new AdRankItem();
|
|
|
try {
|
|
|
- long time20 = System.currentTimeMillis();
|
|
|
adRankItem.setAdId(dto.getCreativeId());
|
|
|
adRankItem.setCreativeCode(dto.getCreativeCode());
|
|
|
adRankItem.setAdVerId(dto.getAdVerId());
|
|
@@ -123,7 +122,6 @@ public class RankStrategyXGBAutoUpdateModel688 extends RankStrategyXGBBasic {
|
|
|
} finally {
|
|
|
cdl1.countDown();
|
|
|
}
|
|
|
- // adRankItem.setFeatureMap(cidFeatureMap);
|
|
|
});
|
|
|
futures.add(future);
|
|
|
}
|
|
@@ -176,8 +174,14 @@ public class RankStrategyXGBAutoUpdateModel688 extends RankStrategyXGBBasic {
|
|
|
long time3 = System.currentTimeMillis();
|
|
|
// 分桶
|
|
|
this.readBucketFile();
|
|
|
- userFeatureMap = this.featureBucket(userFeatureMap);
|
|
|
- CountDownLatch cdl4 = new CountDownLatch(adRankItems.size());
|
|
|
+ CountDownLatch cdl4 = new CountDownLatch(adRankItems.size() + 1);
|
|
|
+ ThreadPoolFactory.feature().submit(() -> {
|
|
|
+ try {
|
|
|
+ userFeatureMap = this.featureBucket(userFeatureMap);
|
|
|
+ } finally {
|
|
|
+ cdl4.countDown();
|
|
|
+ }
|
|
|
+ });
|
|
|
for (AdRankItem adRankItem : adRankItems) {
|
|
|
ThreadPoolFactory.feature().submit(() -> {
|
|
|
try {
|
|
@@ -238,11 +242,10 @@ public class RankStrategyXGBAutoUpdateModel688 extends RankStrategyXGBBasic {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- long time6 = System.currentTimeMillis();
|
|
|
log.info("cost={}, feature1={}, feature2={}, feature31={}, feature32={}, feature4={}, getScorerPipeline={}, " +
|
|
|
- "loop={}, adIdSize={}, adRankItemsSize={}",
|
|
|
+ "adIdSize={}, adRankItemsSize={}",
|
|
|
time6 - start, time1 - start, time2 - time1, time31 - time2, time3 - time31, time4 - time3,
|
|
|
- time5 - time4, time6 - time5, request.getAdIdList().size(), adRankItems.size());
|
|
|
+ time5 - time4, request.getAdIdList().size(), adRankItems.size());
|
|
|
|
|
|
result.sort(ComparatorUtil.equalsRandomComparator());
|
|
|
|