diff options
| author | chrislu <chris.lu@gmail.com> | 2023-09-16 15:05:38 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-09-16 15:05:38 -0700 |
| commit | 482742514656e9b5a652acf7406740fbc55db13d (patch) | |
| tree | 9be51ec65888a0741f63912c9bc125d0278d3360 /weed/mq/balancer/balancer.go | |
| parent | 3b50139f68d5f59961113cf8fd0b903a7294a6ca (diff) | |
| download | seaweedfs-482742514656e9b5a652acf7406740fbc55db13d.tar.xz seaweedfs-482742514656e9b5a652acf7406740fbc55db13d.zip | |
balancer works
Diffstat (limited to 'weed/mq/balancer/balancer.go')
| -rw-r--r-- | weed/mq/balancer/balancer.go | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/weed/mq/balancer/balancer.go b/weed/mq/balancer/balancer.go index 4c5f8f3c8..74871925f 100644 --- a/weed/mq/balancer/balancer.go +++ b/weed/mq/balancer/balancer.go @@ -1,7 +1,6 @@ package balancer import ( - "fmt" cmap "github.com/orcaman/concurrent-map/v2" ) @@ -10,24 +9,10 @@ type Balancer struct { } type BrokerStats struct { TopicPartitionCount int32 - MessageCount int64 - BytesCount int64 + ConsumerCount int32 CpuUsagePercent int32 } -type TopicPartition struct { - Topic string - RangeStart int32 - RangeStop int32 -} - -type TopicPartitionStats struct { - TopicPartition - Throughput int64 - ConsumerCount int64 - TopicPartitionCount int64 -} - func NewBalancer() *Balancer { return &Balancer{ Brokers: cmap.New[*BrokerStats](), @@ -37,7 +22,3 @@ func NewBalancer() *Balancer { func NewBrokerStats() *BrokerStats { return &BrokerStats{} } - -func (tp *TopicPartition) String() string { - return fmt.Sprintf("%v-%04d-%04d", tp.Topic, tp.RangeStart, tp.RangeStop) -} |
