code cleanup by sonar

This commit is contained in:
三丙
2024-10-14 10:08:03 +08:00
parent 2cd7c9c573
commit 54fcb66f5e

View File

@@ -39,12 +39,12 @@ public class HashPartitionProvider implements PartitionProvider {
@Value("${queue.partitions.hash_function_name:murmur3_128}")
private String hashFunctionName;
private final ConcurrentMap<QueueKey, String> partitionTopicsMap = new ConcurrentHashMap<>();
private final ConcurrentMap<QueueKey, Integer> partitionSizesMap = new ConcurrentHashMap<>();
private final Map<QueueKey, String> partitionTopicsMap = new ConcurrentHashMap<>();
private final Map<QueueKey, Integer> partitionSizesMap = new ConcurrentHashMap<>();
private HashFunction hashFunction;
protected volatile ConcurrentMap<QueueKey, List<Integer>> myPartitions = new ConcurrentHashMap<>();
protected Map<QueueKey, List<Integer>> myPartitions = new ConcurrentHashMap<>();
@Resource
private ApplicationEventPublisher applicationEventPublisher;
@@ -118,7 +118,7 @@ public class HashPartitionProvider implements PartitionProvider {
}
});
final ConcurrentMap<QueueKey, List<Integer>> oldPartitions = myPartitions;
final Map<QueueKey, List<Integer>> oldPartitions = myPartitions;
myPartitions = newPartitions;
log.info("Current Server responsible partitions: {}", myPartitions);