|
|
@@ -221,25 +221,15 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
|
|
|
// 等待所有任务完成并合并结果
|
|
|
for (Future<Feature> future : futures) {
|
|
|
- try {
|
|
|
- Feature batchFeature = future.get(); // 获取每个任务的结果
|
|
|
- if (batchFeature != null) {
|
|
|
- if (finalFeature == null) {
|
|
|
- finalFeature = batchFeature;
|
|
|
- } else {
|
|
|
- // 合并特征
|
|
|
- finalFeature.merge(batchFeature);
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (ExecutionException e) {
|
|
|
- log.error("获取特征批次失败: {}", e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
|
|
|
- // 继续处理其他批次,不中断整个流程
|
|
|
+ Feature batchFeature = future.get(); // 获取每个任务的结果
|
|
|
+ if (finalFeature == null) {
|
|
|
+ finalFeature = batchFeature;
|
|
|
+ } else {
|
|
|
+ // 合并特征
|
|
|
+ finalFeature.merge(batchFeature);
|
|
|
}
|
|
|
}
|
|
|
- } catch (InterruptedException e) {
|
|
|
- log.error("getFeature interrupted", e);
|
|
|
- Thread.currentThread().interrupt();
|
|
|
- } catch (Exception e) {
|
|
|
+ } catch (InterruptedException | ExecutionException e) {
|
|
|
log.error("getFeature error", e);
|
|
|
}
|
|
|
return finalFeature;
|