-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Shichao Nie <[email protected]>
- Loading branch information
Showing
5 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...on/src/main/java/org/apache/kafka/server/metrics/s3stream/PartitionCountDistribution.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright 2024, AutoMQ CO.,LTD. | ||
* | ||
* Use of this software is governed by the Business Source License | ||
* included in the file BSL.md | ||
* | ||
* As of the Change Date specified in that file, in accordance with | ||
* the Business Source License, use of this software will be governed | ||
* by the Apache License, Version 2.0 | ||
*/ | ||
|
||
package org.apache.kafka.server.metrics.s3stream; | ||
|
||
import java.util.Map; | ||
|
||
public class PartitionCountDistribution { | ||
private final int brokerId; | ||
private final String rack; | ||
private final Map<String, Integer> topicPartitionCount; | ||
|
||
public PartitionCountDistribution(int brokerId, String rack, Map<String, Integer> topicPartitionCount) { | ||
this.brokerId = brokerId; | ||
this.rack = rack; | ||
this.topicPartitionCount = topicPartitionCount; | ||
} | ||
|
||
public int brokerId() { | ||
return brokerId; | ||
} | ||
|
||
public String rack() { | ||
return rack; | ||
} | ||
|
||
public Map<String, Integer> topicPartitionCount() { | ||
return topicPartitionCount; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters