clickhouse

package
v1.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClickHouseDistributedTablePrefix string = "dist_"
	ClickHouseQueryStart             string = "QueryStart"
	ClickHouseQueryFinish            string = "QueryFinish"
	ClickHouseQueryExStart           string = "ExceptionBeforeStart"
	ClickHouseQueryExProcessing      string = "ExceptionWhileProcessing"
	ClickHouseConfigVersionKey       string = "ck_cluster_config_version"
	ClickHouseClustersFile           string = "clusters.json"
	ClickHouseServiceTimeout         int    = 3600
)

Variables

View Source
var CkClusters sync.Map

Functions

func AddCkClusterConfigVersion

func AddCkClusterConfigVersion()

func ConvertZooPath added in v1.3.1

func ConvertZooPath(conf *model.CKManClickHouseConfig) []string

func DropTableIfExists added in v1.3.4

func DropTableIfExists(params model.CreateCkTableParams, ck *CkService)

func GetCkClusterConfig

func GetCkClusterConfig(conf *model.CKManClickHouseConfig) error

func GetCkClusterStatus

func GetCkClusterStatus(conf *model.CKManClickHouseConfig) []model.CkClusterNode

func GetCkOpenSessions

func GetCkOpenSessions(conf *model.CKManClickHouseConfig, limit int) ([]*model.CkSessionInfo, error)

func GetCkSlowSessions

func GetCkSlowSessions(conf *model.CKManClickHouseConfig, limit int) ([]*model.CkSessionInfo, error)

func GetCkTableMetrics

func GetCkTableMetrics(conf *model.CKManClickHouseConfig) (map[string]*model.CkTableMetrics, error)

func GetReplicaZkPath added in v1.3.1

func GetReplicaZkPath(conf *model.CKManClickHouseConfig) error

func MarshalClusters

func MarshalClusters() ([]byte, error)

func ParseCkClusterConfigFile

func ParseCkClusterConfigFile() error

func ReadClusterConfigFile

func ReadClusterConfigFile() ([]byte, error)

func UnmarshalClusters

func UnmarshalClusters(data []byte) (map[string]interface{}, error)

func UpdateCkClusterConfigFile

func UpdateCkClusterConfigFile() error

func UpdateLocalCkClusterConfig

func UpdateLocalCkClusterConfig(data []byte) (updated bool, err error)

func WriteClusterConfigFile

func WriteClusterConfigFile(data []byte) error

Types

type CkService

type CkService struct {
	Config *model.CKManClickHouseConfig
	DB     *sql.DB
}

func GetCkNodeService

func GetCkNodeService(clusterName string, node string) (*CkService, error)

func GetCkService

func GetCkService(clusterName string) (*CkService, error)

func NewCkService

func NewCkService(config *model.CKManClickHouseConfig) *CkService

func (*CkService) AlterTable

func (ck *CkService) AlterTable(params *model.AlterCkTableParams) error

func (*CkService) CreateTable

func (ck *CkService) CreateTable(params *model.CreateCkTableParams) error

func (*CkService) DeleteTable

func (ck *CkService) DeleteTable(conf *model.CKManClickHouseConfig, params *model.DeleteCkTableParams) error

func (*CkService) DescTable

func (ck *CkService) DescTable(params *model.DescCkTableParams) ([]model.CkColumnAttribute, error)

func (*CkService) FetchSchemerFromOtherNode

func (ck *CkService) FetchSchemerFromOtherNode(host string) error

func (*CkService) InitCkService

func (ck *CkService) InitCkService() error

func (*CkService) QueryInfo

func (ck *CkService) QueryInfo(query string) ([][]interface{}, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL