diff options
| author | chrislu <chris.lu@gmail.com> | 2023-09-19 16:22:41 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-09-19 16:22:41 -0700 |
| commit | 411bdda08dc4e902246ee387ae3abe71309e4586 (patch) | |
| tree | 0163940df1f8c1a513f4a348a8d9afe8cbec0671 | |
| parent | 440ebd7b6d5ff64ca4efec04eda5897bacaf0c47 (diff) | |
| download | seaweedfs-411bdda08dc4e902246ee387ae3abe71309e4586.tar.xz seaweedfs-411bdda08dc4e902246ee387ae3abe71309e4586.zip | |
fix compilation
| -rw-r--r-- | weed/mq/client/pub_client/publish.go | 4 | ||||
| -rw-r--r-- | weed/mq/client/pub_client/publisher.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/weed/mq/client/pub_client/publish.go b/weed/mq/client/pub_client/publish.go index de4714831..9495e380c 100644 --- a/weed/mq/client/pub_client/publish.go +++ b/weed/mq/client/pub_client/publish.go @@ -2,13 +2,13 @@ package pub_client import ( "fmt" - "github.com/seaweedfs/seaweedfs/weed/mq/broker" + "github.com/seaweedfs/seaweedfs/weed/mq/balancer" "github.com/seaweedfs/seaweedfs/weed/pb/mq_pb" "github.com/seaweedfs/seaweedfs/weed/util" ) func (p *TopicPublisher) Publish(key, value []byte) error { - hashKey := util.HashToInt32(key) % broker.MaxPartitionCount + hashKey := util.HashToInt32(key) % balancer.MaxPartitionCount if hashKey < 0 { hashKey = -hashKey } diff --git a/weed/mq/client/pub_client/publisher.go b/weed/mq/client/pub_client/publisher.go index 7073457f3..bf1711e38 100644 --- a/weed/mq/client/pub_client/publisher.go +++ b/weed/mq/client/pub_client/publisher.go @@ -2,7 +2,7 @@ package pub_client import ( "github.com/rdleal/intervalst/interval" - "github.com/seaweedfs/seaweedfs/weed/mq/broker" + "github.com/seaweedfs/seaweedfs/weed/mq/balancer" "github.com/seaweedfs/seaweedfs/weed/pb/mq_pb" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -46,7 +46,7 @@ func (p *TopicPublisher) Connect(bootstrapBroker string) error { func (p *TopicPublisher) Shutdown() error { - if clients, found := p.partition2Broker.AllIntersections(0, broker.MaxPartitionCount); found { + if clients, found := p.partition2Broker.AllIntersections(0, balancer.MaxPartitionCount); found { for _, client := range clients { client.CloseSend() } |
