mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
passing partition info
This commit is contained in:
parent
be0c426dc7
commit
fdf0ea8e11
|
@ -89,22 +89,14 @@ func (manager *LocalTopicManager) CollectStats(duration time.Duration) *mq_pb.Br
|
||||||
for _, localPartition := range localTopic.Partitions {
|
for _, localPartition := range localTopic.Partitions {
|
||||||
topicPartition := &TopicPartition{
|
topicPartition := &TopicPartition{
|
||||||
Topic: Topic{Namespace: localTopic.Namespace, Name: localTopic.Name},
|
Topic: Topic{Namespace: localTopic.Namespace, Name: localTopic.Name},
|
||||||
Partition: Partition{
|
Partition: localPartition.Partition,
|
||||||
RingSize: localPartition.RingSize,
|
|
||||||
RangeStart: localPartition.RangeStart,
|
|
||||||
RangeStop: localPartition.RangeStop,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
stats.Stats[topicPartition.String()] = &mq_pb.TopicPartitionStats{
|
stats.Stats[topicPartition.String()] = &mq_pb.TopicPartitionStats{
|
||||||
Topic: &mq_pb.Topic{
|
Topic: &mq_pb.Topic{
|
||||||
Namespace: string(localTopic.Namespace),
|
Namespace: string(localTopic.Namespace),
|
||||||
Name: localTopic.Name,
|
Name: localTopic.Name,
|
||||||
},
|
},
|
||||||
Partition: &mq_pb.Partition{
|
Partition: localPartition.Partition.ToPbPartition(),
|
||||||
RingSize: localPartition.RingSize,
|
|
||||||
RangeStart: localPartition.RangeStart,
|
|
||||||
RangeStop: localPartition.RangeStop,
|
|
||||||
},
|
|
||||||
ConsumerCount: localPartition.ConsumerCount,
|
ConsumerCount: localPartition.ConsumerCount,
|
||||||
}
|
}
|
||||||
// fmt.Printf("collect topic %+v partition %+v\n", topicPartition, localPartition.Partition)
|
// fmt.Printf("collect topic %+v partition %+v\n", topicPartition, localPartition.Partition)
|
||||||
|
|
Loading…
Reference in a new issue