Documentation ¶
Index ¶
- Constants
- func ExportRegionsInfo(cmd *cobra.Command, _ []string)
- func NewHotRegionCommand() *cobra.Command
- func NewRegionCommand() *cobra.Command
- func PrintRegionsInfo(cmd *cobra.Command, _ []string)
- func ShowRegionDistributionFnc(cmd *cobra.Command, _ []string)
- type HotPeerStatShow
- type HotPeersStat
- type Peer
- type RegionInfo
- type RegionsInfo
- type StoreHotPeersInfos
- type StoreInfo
- type StoreInfos
- type StoresInfo
Constants ¶
View Source
const ( // Initiated by admin. Read hotType = "/hotspot/regions/read" // Initiated by merge checker or merge scheduler. Note that it may not include region merge. // the order describe the operator's producer and is very helpful to decouple scheduler or checker limit Write hotType = "/hotspot/regions/write" )
Variables ¶
This section is empty.
Functions ¶
func ExportRegionsInfo ¶
func PrintRegionsInfo ¶
Types ¶
type HotPeerStatShow ¶
type HotPeerStatShow struct { StoreID uint64 `json:"store_id"` RegionID uint64 `json:"region_id"` HotDegree int `json:"hot_degree"` ByteRate float64 `json:"flow_bytes"` KeyRate float64 `json:"flow_keys"` QueryRate float64 `json:"flow_query"` AntiCount int `json:"anti_count"` LastUpdateTime time.Time `json:"last_update_time"` }
HotPeerStatShow records the hot region statistics for output
type HotPeersStat ¶
type HotPeersStat struct { TotalLoads []float64 `json:"-"` TotalBytesRate float64 `json:"total_flow_bytes"` TotalKeysRate float64 `json:"total_flow_keys"` TotalQueryRate float64 `json:"total_flow_query"` Count int `json:"regions_count"` Stats []HotPeerStatShow `json:"statistics"` }
HotPeersStat records all hot regions statistics
type RegionInfo ¶
type RegionsInfo ¶
type RegionsInfo struct { Count int `json:"count"` Regions []*RegionInfo `json:"regions"` }
func GetRegionsInfo ¶
func GetRegionsInfo(cmd *cobra.Command) (*RegionsInfo, error)
type StoreHotPeersInfos ¶
type StoreHotPeersInfos struct { AsPeer map[string]*HotPeersStat `json:"as_peer"` AsLeader map[string]*HotPeersStat `json:"as_leader"` }
type StoreInfos ¶
type StoreInfos struct { StoreHotPeersStat *StoreHotPeersInfos // contains filtered or unexported fields }
func NewHotRegionExport ¶
func NewHotRegionExport(pd string, stores *StoresInfo, regions *RegionsInfo) *StoreInfos
type StoresInfo ¶
type StoresInfo struct {
Stores []*StoreInfo `json:"stores"`
}
Click to show internal directories.
Click to hide internal directories.