You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
546 B
20 lines
546 B
package balancer
|
|
|
|
import (
|
|
cmap "github.com/orcaman/concurrent-map/v2"
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/mq_pb"
|
|
)
|
|
|
|
func allocateTopicPartitions(brokers cmap.ConcurrentMap[string, *BrokerStats], partitionCount int) (assignments []*mq_pb.BrokerPartitionAssignment) {
|
|
return []*mq_pb.BrokerPartitionAssignment{
|
|
{
|
|
LeaderBroker: "localhost:17777",
|
|
FollowerBrokers: []string{"localhost:17777"},
|
|
Partition: &mq_pb.Partition{
|
|
RingSize: MaxPartitionCount,
|
|
RangeStart: 0,
|
|
RangeStop: MaxPartitionCount,
|
|
},
|
|
},
|
|
}
|
|
}
|