Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: add new api to expose the distribution of the regions in different instance #9089

Open
bufferflies opened this issue Feb 20, 2025 · 0 comments · May be fixed by #9090
Open

api: add new api to expose the distribution of the regions in different instance #9089

bufferflies opened this issue Feb 20, 2025 · 0 comments · May be fixed by #9090
Labels
type/development The issue belongs to a development tasks

Comments

@bufferflies
Copy link
Contributor

bufferflies commented Feb 20, 2025

Development Task

PD can provide new API to expose the distribution of the regions in different instance
uri: /pd/api/v1/distribution/region?start_key=xxxx&&end_key=xxxx&engine=xxx

response:

type RegionDistributions struct {
	RegionDistributions []*RegionDistribution `json:"region_distribution"`
}

type RegionStats struct {
	Count                int               `json:"count"`
	EmptyCount           int               `json:"empty_count"`
	StorageSize          int64             `json:"storage_size"`
	UserStorageSize      int64             `json:"user_storage_size"`
	StorageKeys          int64             `json:"storage_keys"`
	StoreLeaderCount     map[uint64]int    `json:"store_leader_count"`
	StorePeerCount       map[uint64]int    `json:"store_peer_count"`
	StoreLeaderSize      map[uint64]int64  `json:"store_leader_size"`
	StoreLeaderKeys      map[uint64]int64  `json:"store_leader_keys"`
	StorePeerSize        map[uint64]int64  `json:"store_peer_size"`
	StorePeerKeys        map[uint64]int64  `json:"store_peer_keys"`
	StoreWriteBytes      map[uint64]uint64 `json:"store_write_bytes"`
	StoreWriteKeys       map[uint64]uint64 `json:"store_write_keys"`
	StoreLeaderReadBytes map[uint64]uint64 `json:"store_leader_read_bytes"`
	StoreLeaderReadKeys  map[uint64]uint64 `json:"store_leader_read_keys"`
	StorePeerReadBytes   map[uint64]uint64 `json:"store_peer_read_bytes"`
	StorePeerReadKeys    map[uint64]uint64 `json:"store_peer_read_keys"`
	StorePeerReadQuery   map[uint64]uint64 `json:"store_peer_read_query"`
}
@bufferflies bufferflies added the type/development The issue belongs to a development tasks label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/development The issue belongs to a development tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant