Versions in this module Expand all Collapse all v1 v1.0.0 Aug 23, 2023 v0 v0.1.0 Aug 23, 2023 Changes in this version + func BytesKeyToHex(key []byte) string + func CollectTiFlashStatus(statusAddress string, tableID int64, regionReplica *map[int64]int) error + func ComputeTiFlashStatus(reader *bufio.Reader, regionReplica *map[int64]int) error + func GetTiFlashTableIDFromEndKey(endKey string) int64 + type FrameItem struct + DBName string + IndexID int64 + IndexName string + IndexValues []string + IsRecord bool + RecordID int64 + TableID int64 + TableName string + func NewFrameItemFromRegionKey(key []byte) (frame *FrameItem, err error) + type Helper struct + RegionCache *tikv.RegionCache + Store Storage + func NewHelper(store Storage) *Helper + func (*Helper) FilterMemDBs(oldSchemas []*model.DBInfo) (schemas []*model.DBInfo) + func (*Helper) FindTableIndexOfRegion(allSchemas []*model.DBInfo, hotRange *RegionFrameRange) *FrameItem + func (*Helper) GetTablesInfoWithKeyRange(schemas []*model.DBInfo) []TableInfoWithKeyRange + func (*Helper) ParseRegionsTableInfos(regionsInfo []*RegionInfo, tables []TableInfoWithKeyRange) map[int64][]TableInfo + func (h *Helper) DeletePlacementRule(group string, ruleID string) error + func (h *Helper) FetchHotRegion(rw string) (map[uint64]RegionMetric, error) + func (h *Helper) FetchRegionTableIndex(metrics map[uint64]RegionMetric, allSchemas []*model.DBInfo) ([]HotTableIndex, error) + func (h *Helper) GetGroupRules(group string) ([]placement.Rule, error) + func (h *Helper) GetMvccByEncodedKey(encodedKey kv.Key) (*kvrpcpb.MvccGetByKeyResponse, error) + func (h *Helper) GetMvccByStartTs(startTS uint64, startKey, endKey kv.Key) (*MvccKV, error) + func (h *Helper) GetPDAddr() ([]string, error) + func (h *Helper) GetPDRegionStats(tableID int64, stats *PDRegionStats, noIndexStats bool) error + func (h *Helper) GetRegionByKey(k []byte) (*RegionInfo, error) + func (h *Helper) GetRegionInfoByID(regionID uint64) (*RegionInfo, error) + func (h *Helper) GetRegionsInfo() (*RegionsInfo, error) + func (h *Helper) GetRegionsInfoByRange(sk, ek []byte) (*RegionsInfo, error) + func (h *Helper) GetRegionsTableInfo(regionsInfo *RegionsInfo, schemas []*model.DBInfo) map[int64][]TableInfo + func (h *Helper) GetStoreRegionsInfo(storeID uint64) (*RegionsInfo, error) + func (h *Helper) GetStoresStat() (*StoresStat, error) + func (h *Helper) PostAccelerateSchedule(tableID int64) error + func (h *Helper) ScrapeHotInfo(rw string, allSchemas []*model.DBInfo) ([]HotTableIndex, error) + func (h *Helper) SetPlacementRule(rule placement.Rule) error + type HotRegionsStat struct + RegionsStat []RegionStat + type HotTableIndex struct + DbName string + IndexID int64 + IndexName string + RegionID uint64 + RegionMetric *RegionMetric + TableID int64 + TableName string + type MvccKV struct + Key string + RegionID uint64 + Value *kvrpcpb.MvccGetByKeyResponse + type PDRegionStats struct + Count int + EmptyCount int + StorageKeys int64 + StorageSize int64 + StoreLeaderCount map[uint64]int + StorePeerCount map[uint64]int + type RegionEpoch struct + ConfVer int64 + Version int64 + type RegionFrameRange struct + First *FrameItem + Last *FrameItem + func NewRegionFrameRange(region *tikv.KeyLocation) (idxRange *RegionFrameRange, err error) + func (r *RegionFrameRange) GetIndexFrame(tableID, indexID int64, dbName, tableName, indexName string) *FrameItem + func (r *RegionFrameRange) GetRecordFrame(tableID int64, dbName, tableName string, isCommonHandle bool) (f *FrameItem) + type RegionInfo struct + ApproximateKeys int64 + ApproximateSize int64 + DownPeers []RegionPeerStat + EndKey string + Epoch RegionEpoch + ID int64 + Leader RegionPeer + Peers []RegionPeer + PendingPeers []RegionPeer + ReadBytes uint64 + ReplicationStatus *ReplicationStatus + StartKey string + WrittenBytes uint64 + type RegionMetric struct + Count int + FlowBytes uint64 + MaxHotDegree int + type RegionPeer struct + ID int64 + IsLearner bool + StoreID int64 + type RegionPeerStat struct + DownSec int64 + Peer RegionPeer + type RegionStat struct + FlowBytes float64 + HotDegree int + RegionID uint64 + type RegionsInfo struct + Count int64 + Regions []RegionInfo + func NewRegionsInfo() *RegionsInfo + func (r *RegionsInfo) Merge(other *RegionsInfo) *RegionsInfo + type ReplicationStatus struct + State string + StateID int64 + type Storage interface + Begin func(opts ...tikv.TxnOption) (kv.Transaction, error) + Close func() error + Closed func() <-chan struct{} + CurrentTimestamp func(txnScop string) (uint64, error) + CurrentVersion func(txnScope string) (kv.Version, error) + Describe func() string + GetClient func() kv.Client + GetLockResolver func() *txnlock.LockResolver + GetLockWaits func() ([]*deadlockpb.WaitForEntry, error) + GetMPPClient func() kv.MPPClient + GetMemCache func() kv.MemManager + GetMinSafeTS func(txnScope string) uint64 + GetOracle func() oracle.Oracle + GetRegionCache func() *tikv.RegionCache + GetSafePointKV func() tikv.SafePointKV + GetSnapshot func(ver kv.Version) kv.Snapshot + GetTiKVClient func() tikv.Client + Name func() string + SendReq func(bo *tikv.Backoffer, req *tikvrpc.Request, regionID tikv.RegionVerID, ...) (*tikvrpc.Response, error) + SetOracle func(oracle oracle.Oracle) + SetTiKVClient func(client tikv.Client) + ShowStatus func(ctx context.Context, key string) (interface{}, error) + SupportDeleteRange func() (supported bool) + UUID func() string + UpdateSPCache func(cachedSP uint64, cachedTime time.Time) + type StoreBaseStat struct + Address string + GitHash string + ID int64 + Labels []StoreLabel + StartTimestamp int64 + State int64 + StateName string + StatusAddress string + Version string + type StoreDetailStat struct + Available string + Capacity string + LastHeartbeatTs time.Time + LeaderCount int64 + LeaderScore float64 + LeaderSize int64 + LeaderWeight float64 + RegionCount int64 + RegionScore float64 + RegionSize int64 + RegionWeight float64 + StartTs time.Time + Uptime string + type StoreHotRegionInfos struct + AsLeader map[uint64]*HotRegionsStat + AsPeer map[uint64]*HotRegionsStat + type StoreLabel struct + Key string + Value string + type StoreStat struct + Status StoreDetailStat + Store StoreBaseStat + type StoresStat struct + Count int + Stores []StoreStat + type TableInfo struct + DB *model.DBInfo + Index *model.IndexInfo + IsIndex bool + Table *model.TableInfo + type TableInfoWithKeyRange struct + EndKey string + StartKey string + func NewIndexWithKeyRange(db *model.DBInfo, table *model.TableInfo, index *model.IndexInfo) TableInfoWithKeyRange + func NewTableWithKeyRange(db *model.DBInfo, table *model.TableInfo) TableInfoWithKeyRange + type TblIndex struct + DbName string + IndexID int64 + IndexName string + TableID int64 + TableName string