entity

package
v0.0.0-...-35e5317 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeTaskList

func GeTaskList(jsstage JsonStage) map[int]StageTaskInfo

func GetQueriesList

func GetQueriesList(queies JsonQuery1, serverKey string) map[string]Query

func GetSimilaryListInFo

func GetSimilaryListInFo(str string, wftasklist map[string]Wftaskinfo, separator string) string

func GetWfTaskList

func GetWfTaskList(query string, mysqlconn string, args ...interface{}) map[string]Wftaskinfo

func MapByJson

func MapByJson(dataString string) map[int]JsonServer

func QueryToStringBySeparator

func QueryToStringBySeparator(query Query, separator string, wftasklist map[string]Wftaskinfo) string

func StagesListToString

func StagesListToString(il []int64) string

func TaskInfoListSplitToString

func TaskInfoListSplitToString(ServerKey string, tl []StageTaskInfo) string

func TaskToStringBySeparator

func TaskToStringBySeparator(task Task, separator string) string

Types

type JsonQuery1

type JsonQuery1 struct {
	Data []struct {
		AccumulableDurations          interface{} `json:"accumulableDurations"`
		ActiveTasks                   int64       `json:"activeTasks"`
		CompletionTime                int64       `json:"completionTime"`
		Description                   string      `json:"description"`
		DetailedDescription           string      `json:"detailedDescription"`
		DurationBlockMap              struct{}    `json:"durationBlockMap"`
		Durations                     interface{} `json:"durations"`
		ExecutionFinishTime           int64       `json:"executionFinishTime"`
		ExecutionStartTime            int64       `json:"executionStartTime"`
		ExtraJobID                    int64       `json:"extraJobId"`
		FetchComputeTotal             int64       `json:"fetchComputeTotal"`
		FetchCount                    int64       `json:"fetchCount"`
		FetchResultStartTime          int64       `json:"fetchResultStartTime"`
		FetchRowCount                 int64       `json:"fetchRowCount"`
		FileCommitFinishTime          int64       `json:"fileCommitFinishTime"`
		Group                         string      `json:"group"`
		Jobs                          string      `json:"jobs"`
		JobsActive                    int64       `json:"jobsActive"`
		JobsCompleted                 int64       `json:"jobsCompleted"`
		JobsFailed                    int64       `json:"jobsFailed"`
		LogicalPlanString             interface{} `json:"logicalPlanString"`
		LogicalPlanStrings            interface{} `json:"logicalPlanStrings"`
		MemoryPerTask                 int64       `json:"memoryPerTask"`
		Message                       string      `json:"message"`
		MessageNameStr                interface{} `json:"messageNameStr"`
		Meta                          struct{}    `json:"meta"`
		Metrics                       interface{} `json:"metrics"`
		Mode                          string      `json:"mode"`
		NonLinearAccumulableDurations interface{} `json:"nonLinearAccumulableDurations"`
		NonLinearDurations            interface{} `json:"nonLinearDurations"`
		PhysicalPlanString            interface{} `json:"physicalPlanString"`
		PhysicalPlanStrings           interface{} `json:"physicalPlanStrings"`
		PlanInputs                    interface{} `json:"planInputs"`
		PlanOutputs                   interface{} `json:"planOutputs"`
		RealFetchResultStartTime      int64       `json:"realFetchResultStartTime"`
		SessionID                     int64       `json:"sessionId"`
		SessionName                   string      `json:"sessionName"`
		SqlBlockJSON                  interface{} `json:"sqlBlockJson"`
		SqlID                         int64       `json:"sqlId"`
		SqlName                       interface{} `json:"sqlName"`
		SqlType                       interface{} `json:"sqlType"`
		Stages                        interface{} `json:"stages"`
		StagesActive                  int64       `json:"stagesActive"`
		StagesCompleted               int64       `json:"stagesCompleted"`
		StagesFailed                  int64       `json:"stagesFailed"`
		StagesSkipped                 int64       `json:"stagesSkipped"`
		State                         string      `json:"state"`
		SubmissionTime                int64       `json:"submissionTime"`
		TableScans                    interface{} `json:"tableScans"`
		Tags                          string      `json:"tags"`
		TasksActive                   int64       `json:"tasksActive"`
		TasksCompleted                int64       `json:"tasksCompleted"`
		TasksExpected                 int64       `json:"tasksExpected"`
		TasksFailed                   int64       `json:"tasksFailed"`
		TasksSkipped                  int64       `json:"tasksSkipped"`
		TotalTaskTime                 int64       `json:"totalTaskTime"`
		User                          string      `json:"user"`
	} `json:"data"`
	Error []string      `json:"error"`
	Info  []interface{} `json:"info"`
	Query struct {
		DataKey  string      `json:"dataKey"`
		DataSize int64       `json:"dataSize"`
		Host     interface{} `json:"host"`
		ID       int64       `json:"id"`
		Port     interface{} `json:"port"`
		StringID interface{} `json:"stringId"`
	} `json:"query"`
	Warning           []interface{} `json:"warning"`
	WatchmanTimestamp int64         `json:"watchmanTimestamp"`
}

type JsonQueryStageInfo

type JsonQueryStageInfo struct {
	Data struct {
		SqlID  int64 `json:"sqlId"`
		Stages []struct {
			//Stages []struct {
			//	StageID        int64       `json:"stageId"`
			//} `json:"attempts"`
			StageID int64 `json:"stageId"`
		} `json:"stages"`
	} `json:"data"`
}

type JsonServer

type JsonServer struct {
	ServerId       int    `json:"serverId"`
	DataKey        string `json:"key"`
	Hosts          string `json:"host"`
	Port           int    `json:"port"`
	Timestamp      int64  `json:"timestamp"`
	FirstSeen      int64  `json:"firstSeen"`
	LocalTimestamp int64  `json:"localTimestamp"`
}

type JsonStage

type JsonStage struct {
	Data struct {
		AttemptID int64 `json:"attemptId"`
		Attempts  []struct {
			AttemptID      int64  `json:"attemptId"`
			CompletionTime int64  `json:"completionTime"`
			Message        string `json:"message"`
			StageID        int64  `json:"stageId"`
			SubmissionTime int64  `json:"submissionTime"`
		} `json:"attempts"`
		CompletionTime int64  `json:"completionTime"`
		Description    string `json:"description"`
		Executors      []struct {
			ActiveTasks        int64       `json:"activeTasks"`
			CompletedTasks     int64       `json:"completedTasks"`
			DirStatus          interface{} `json:"dirStatus"`
			ExecutorID         string      `json:"executorId"`
			FailedTasks        int64       `json:"failedTasks"`
			FirstSeen          int64       `json:"firstSeen"`
			FirstSeenLocal     int64       `json:"firstSeenLocal"`
			GcInfo             interface{} `json:"gcInfo"`
			Host               string      `json:"host"`
			Input              int64       `json:"input"`
			Jobs               interface{} `json:"jobs"`
			LastSeen           int64       `json:"lastSeen"`
			LastSeenLocal      int64       `json:"lastSeenLocal"`
			LocalTasks         interface{} `json:"localTasks"`
			LogLevel           interface{} `json:"logLevel"`
			MaxMemory          int64       `json:"maxMemory"`
			Port               int64       `json:"port"`
			ShuffleReadBytes   int64       `json:"shuffleReadBytes"`
			ShuffleSpillDisk   int64       `json:"shuffleSpillDisk"`
			ShuffleSpillMemory int64       `json:"shuffleSpillMemory"`
			ShuffleWriteBytes  int64       `json:"shuffleWriteBytes"`
			Sqls               interface{} `json:"sqls"`
			Stages             interface{} `json:"stages"`
			Statuses           interface{} `json:"statuses"`
			Tasks              interface{} `json:"tasks"`
			TasksActive        int64       `json:"tasksActive"`
			TasksCompleted     int64       `json:"tasksCompleted"`
			TasksFailed        int64       `json:"tasksFailed"`
			TotalCores         int64       `json:"totalCores"`
			TotalTask          int64       `json:"totalTask"`
			TotalTaskTime      int64       `json:"totalTaskTime"`
			Version            int64       `json:"version"`
		} `json:"executors"`
		Input             int64       `json:"input"`
		InputRowsString   interface{} `json:"inputRowsString"`
		JobID             int64       `json:"jobId"`
		Message           string      `json:"message"`
		OutputRowsString  interface{} `json:"outputRowsString"`
		PartitionSize     int64       `json:"partitionSize"`
		ShuffleReadBytes  int64       `json:"shuffleReadBytes"`
		ShuffleWriteBytes int64       `json:"shuffleWriteBytes"`
		Sources           interface{} `json:"sources"`
		SqlGroup          string      `json:"sqlGroup"`
		SqlID             int64       `json:"sqlId"`
		StageID           int64       `json:"stageId"`
		StageMode         interface{} `json:"stageMode"`
		StagePoolName     interface{} `json:"stagePoolName"`
		Status            string      `json:"status"`
		SubmissionTime    int64       `json:"submissionTime"`
		TaskTimes         interface{} `json:"taskTimes"`
		Tasks             []struct {
			Accumulators                 struct{}    `json:"accumulators"`
			Aggregation                  interface{} `json:"aggregation"`
			Attempt                      int64       `json:"attempt"`
			CompletionTime               int64       `json:"completionTime"`
			Durations                    struct{}    `json:"durations"`
			ExecutorID                   string      `json:"executorId"`
			GarbageCollectionTime        int64       `json:"garbageCollectionTime"`
			Host                         string      `json:"host"`
			Input                        int64       `json:"input"`
			Message                      string      `json:"message"`
			Metrics                      struct{}    `json:"metrics"`
			Port                         int64       `json:"port"`
			ResultSerializationTime      int64       `json:"resultSerializationTime"`
			SchedulerDelay               int64       `json:"schedulerDelay"`
			Sequence                     interface{} `json:"sequence"`
			ShuffleReadBytes             int64       `json:"shuffleReadBytes"`
			ShuffleSpillDisk             int64       `json:"shuffleSpillDisk"`
			ShuffleSpillMemory           int64       `json:"shuffleSpillMemory"`
			ShuffleWriteBytes            int64       `json:"shuffleWriteBytes"`
			StageID                      int64       `json:"stageId"`
			SubmissionTime               int64       `json:"submissionTime"`
			TaskID                       int64       `json:"taskId"`
			TaskIndexInStage             int64       `json:"taskIndexInStage"`
			TaskLocality                 string      `json:"taskLocality"`
			TimeSpentFetchingTaskResults int64       `json:"timeSpentFetchingTaskResults"`
			WriteTime                    int64       `json:"writeTime"`
		} `json:"tasks"`
		TasksActive    int64       `json:"tasksActive"`
		TasksCompleted int64       `json:"tasksCompleted"`
		TasksExpected  int64       `json:"tasksExpected"`
		TasksFailed    int64       `json:"tasksFailed"`
		TasksSkipped   int64       `json:"tasksSkipped"`
		TotalTaskTime  int64       `json:"totalTaskTime"`
		UserName       interface{} `json:"userName"`
	} `json:"data"`
	Error []interface{} `json:"error"`
	Info  []interface{} `json:"info"`
	Query struct {
		DataKey  string      `json:"dataKey"`
		DataSize int64       `json:"dataSize"`
		Host     interface{} `json:"host"`
		ID       int64       `json:"id"`
		Port     interface{} `json:"port"`
		StringID interface{} `json:"stringId"`
	} `json:"query"`
	Warning           []interface{} `json:"warning"`
	WatchmanTimestamp int64         `json:"watchmanTimestamp"`
}

type Oldtaskinfo

type Oldtaskinfo struct {
	Taskid        string
	Wfid          string
	Name          string
	Configuration []string
}

type Query

type Query struct {
	ServerKey      string
	SqlID          int64
	State          string
	Stages         []int64
	TaskInfo       []StageTaskInfo
	User           string
	Description    string
	SubmissionTime int64
	CompletionTime int64
	Message        string
	CrawlMessage   string
}

type Similar

type Similar struct {
	Taskid    string
	Similarty float64
}

type Similarlist

type Similarlist []Similar

func (Similarlist) Len

func (s Similarlist) Len() int

func (Similarlist) Less

func (s Similarlist) Less(i, j int) bool

func (Similarlist) Swap

func (s Similarlist) Swap(i, j int)

type StageTaskInfo

type StageTaskInfo struct {
	TaskID         int64
	StageID        int64
	SqlID          int64
	Status         string
	Message        string
	Host           string
	SubmissionTime int64
	CompletionTime int64
}

type Task

type Task struct {
	ServerKey          string
	TaskID             int64
	SqlID              int64
	StageID            int64
	TaskHost           string
	TaskStatus         string
	TaskMessage        string
	TaskSubmissionTime int64
	TaskCompletionTime int64
	User               string
}

type Wftaskinfo

type Wftaskinfo struct {
	Taskid        string
	Wfid          string
	Name          string
	Configuration string
}

Jump to

Keyboard shortcuts

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