[community][chore] Modify .asf.yaml and fix BE build warning (#7439)

This commit is contained in:
Mingyu Chen
2021-12-21 11:06:12 +08:00
committed by GitHub
parent e9049605b6
commit 97749ed85b
3 changed files with 18 additions and 9 deletions

View File

@ -21,6 +21,10 @@ github:
labels:
- data-warehousing
- mpp
- olap
- dbms
- apache
- doris
enabled_merge_buttons:
squash: true
merge: false
@ -30,3 +34,5 @@ github:
required_pull_request_reviews:
dismiss_stale_reviews: true
required_approving_review_count: 1
notifications:
pullrequests_status: dev@doris.apache.org

View File

@ -163,13 +163,14 @@ namespace doris {
T floating_value = *reinterpret_cast<const T *>(val);
memcpy(&tmp, &floating_value, sizeof(T));
if (UNLIKELY(std::isnan(floating_value))) return 0;
// "int" is enough because U and T are only primitive type
int s = (int)((sizeof(U) - sizeof(T)) * 8);
if (floating_value < 0.0) {
// Flipping all bits for negative values.
return static_cast<U>(~tmp) << std::max((sizeof(U) - sizeof(T)) * 8, (uint64_t) 0);
return static_cast<U>(~tmp) << std::max(s, 0);
} else {
// Flipping only first bit.
return (static_cast<U>(tmp) << std::max((sizeof(U) - sizeof(T)) * 8, (uint64_t) 0)) ^
mask;
return (static_cast<U>(tmp) << std::max(s, 0)) ^ mask;
}
}

View File

@ -137,12 +137,14 @@ public class ClusterLoadStatistic {
beByTotalReplicaCountMaps.put(medium, beByTotalReplicaCount);
}
// Actually the partition is [partition_id, index_id], aka pid.
// Multimap<skew -> PartitionBalanceInfo>
// PartitionBalanceInfo: <pid -> <partitionReplicaCount, beId>>
// Only count available bes here, aligned with the beByTotalReplicaCountMaps.
skewMaps = invertedIndex.buildPartitionInfoBySkew(beLoadStatistics.stream().filter(BackendLoadStatistic::isAvailable).
map(BackendLoadStatistic::getBeId).collect(Collectors.toList()));
if (Config.tablet_rebalancer_type.equalsIgnoreCase("Partition")) {
// Actually the partition is [partition_id, index_id], aka pid.
// Multimap<skew -> PartitionBalanceInfo>
// PartitionBalanceInfo: <pid -> <partitionReplicaCount, beId>>
// Only count available bes here, aligned with the beByTotalReplicaCountMaps.
skewMaps = invertedIndex.buildPartitionInfoBySkew(beLoadStatistics.stream().filter(BackendLoadStatistic::isAvailable).
map(BackendLoadStatistic::getBeId).collect(Collectors.toList()));
}
}
/*