-
Notifications
You must be signed in to change notification settings - Fork 232
/
Copy pathlog-collector.proto
106 lines (88 loc) · 2.61 KB
/
log-collector.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
syntax = "proto3";
import "common-msg.proto";
option java_multiple_files = true;
option java_package = "com.qlangtech.tis.rpc.grpc.log.stream";
option java_outer_classname = "LogCollectorProto";
option objc_class_prefix = "HLWS";
package stream;
service LogCollector {
// 订阅日志信息
rpc RegisterMonitorEvent (stream PMonotorTarget) returns (stream PExecuteState) {
}
// 订阅全量/DataFlow构建过程中各阶段执行的状态信息
rpc BuildPhraseStatus (PBuildPhaseStatusParam) returns (stream PPhaseStatusCollection) {
}
// 分布式环境下,启动一个同步任务先需要向assemble节点注册所有子任务
rpc InitTask (PPhaseStatusCollection) returns (Empty) {
}
/**
*取得最近一次成功的同步任务状态
*/
rpc LoadPhaseStatus (PBuildPhaseStatusParam) returns (PPhaseStatusCollection) {
}
}
message PBuildPhaseStatusParam {
uint64 taskid = 1;
}
message PPhaseStatusCollection {
PDumpPhaseStatus dumpPhase = 1;
PJoinPhaseStatus joinPhase = 2;
PBuildPhaseStatus buildPhase = 3;
PIndexBackFlowPhaseStatus indexBackFlowPhaseStatus = 4;
uint32 taskId = 5;
}
message PDumpPhaseStatus {
map<string /* table name,db.tableName */, TableDumpStatus> tablesDump = 1;
}
message PJoinPhaseStatus {
map<string /* taskname */, JoinTaskStatus> taskStatus = 1;
}
message PBuildPhaseStatus {
map<string, BuildSharedPhaseStatus> nodeBuildStatus = 1;
}
message PIndexBackFlowPhaseStatus {
map<string /*nodeName*/, NodeBackflowStatus> nodesStatus = 1;
}
message PMonotorTarget {
string collection = 1;
uint32 taskid = 2;
PExecuteState.LogType logtype = 3;
// enum LogType {
// INCR_DEPLOY_STATUS_CHANGE = 0;
// // 近一段时间内增量监听的各个tag的多少值
// MQ_TAGS_STATUS = 1;
// FULL = 2;
// INCR = 3;
// INCR_SEND = 4;
// }
}
message PExecuteState {
InfoType infoType = 1;
LogType logType = 2;
string msg = 3;
string from = 4;
uint64 jobId = 5;
uint64 taskId = 6;
string serviceName = 7;
string execState = 8;
uint64 time = 9;
string component = 10;
enum LogType {
// 部署状态变化
INCR_DEPLOY_STATUS_CHANGE = 0;
// 近一段时间内增量监听的topic下各个tag的多少值
MQ_TAGS_STATUS = 1;
// 全量构建
FULL = 2;
// 增量构建
INCR = 3;
// 增量记录详细发送
INCR_SEND = 4;
}
enum InfoType {
INFO = 0;
WARN = 1;
ERROR = 2;
FATAL = 3;
}
}