Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix][core] Fix the problem of incorrect association between metrics and nodes #7799

Merged
merged 14 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions docs/en/seatunnel-engine/rest-api-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,19 @@ network:
},
"createTime": "",
"jobDag": {
"vertices": [
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
"type": "",
"vertexName": "",
"tablePaths": [
""
]
}
],
"edges": [
]
"pipelineEdges": {}
},
"pluginJarsUrls": [
],
Expand Down Expand Up @@ -162,6 +171,7 @@ network:
"createTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down Expand Up @@ -227,6 +237,7 @@ This API has been deprecated, please use /hazelcast/rest/maps/job-info/:jobId in
"createTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down Expand Up @@ -307,6 +318,7 @@ When we can't get the job info, the response will be:
"finishTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down
18 changes: 15 additions & 3 deletions docs/en/seatunnel-engine/rest-api-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,19 @@ seatunnel:
},
"createTime": "",
"jobDag": {
"vertices": [
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
"type": "",
"vertexName": "",
"tablePaths": [
""
]
}
],
"edges": [
]
"pipelineEdges": {}
},
"pluginJarsUrls": [
],
Expand Down Expand Up @@ -129,6 +138,7 @@ seatunnel:
"createTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down Expand Up @@ -194,6 +204,7 @@ This API has been deprecated, please use /job-info/:jobId instead
"createTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down Expand Up @@ -274,6 +285,7 @@ When we can't get the job info, the response will be:
"finishTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down
21 changes: 17 additions & 4 deletions docs/zh/seatunnel-engine/rest-api-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,19 @@ network:
},
"createTime": "",
"jobDag": {
"vertices": [
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
"type": "",
"vertexName": "",
"tablePaths": [
""
]
}
],
"edges": [
]
"pipelineEdges": {}
},
"pluginJarsUrls": [
],
Expand Down Expand Up @@ -160,6 +169,7 @@ network:
"createTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down Expand Up @@ -239,6 +249,7 @@ network:
"createTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down Expand Up @@ -305,6 +316,7 @@ network:
"finishTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand All @@ -316,7 +328,8 @@ network:
}
],
"pipelineEdges": {}
}, "metrics": ""
},
"metrics": ""
}
]
```
Expand Down
20 changes: 15 additions & 5 deletions docs/zh/seatunnel-engine/rest-api-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,21 @@ seatunnel:
"jobId": "",
"jobName": "",
"jobStatus": "",
"envOptions": {
},
"createTime": "",
"jobDag": {
"vertices": [
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
"type": "",
"vertexName": "",
"tablePaths": [
""
]
}
],
"edges": [
]
"pipelineEdges": {}
},
"pluginJarsUrls": [
],
Expand Down Expand Up @@ -125,6 +132,7 @@ seatunnel:
"createTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down Expand Up @@ -204,6 +212,7 @@ seatunnel:
"createTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down Expand Up @@ -270,6 +279,7 @@ seatunnel:
"finishTime": "",
"jobDag": {
"jobId": "",
"envOptions": [],
"vertexInfoMap": [
{
"vertexId": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,55 @@ public void testGetRunningJobs() {
+ RestConstant.RUNNING_JOBS_URL)
.then()
.statusCode(200)
.body(
"[0].jobDag.jobId",
equalTo(
Long.toString(
clientJobProxy
.getJobId())))
.body("[0].jobDag.pipelineEdges", hasKey("1"))
.body(
"[0].jobDag.pipelineEdges['1']",
hasSize(1))
.body(
"[0].jobDag.pipelineEdges['1'][0].inputVertexId",
equalTo("1"))
.body(
"[0].jobDag.pipelineEdges['1'][0].targetVertexId",
equalTo("2"))
.body("[0].jobDag.vertexInfoMap", hasSize(2))
.body(
"[0].jobDag.vertexInfoMap[0].vertexId",
equalTo(1))
.body(
"[0].jobDag.vertexInfoMap[0].type",
equalTo("source"))
.body(
"[0].jobDag.vertexInfoMap[0].vertexName",
equalTo(
"pipeline-1 [Source[0]-FakeSource]"))
.body(
"[0].jobDag.vertexInfoMap[0].tablePaths[0]",
equalTo("fake"))
.body(
"[0].jobDag.vertexInfoMap[1].vertexId",
equalTo(2))
.body(
"[0].jobDag.vertexInfoMap[1].type",
equalTo("sink"))
.body(
"[0].jobDag.vertexInfoMap[1].vertexName",
equalTo(
"pipeline-1 [Sink[0]-LocalFile-MultiTableSink]"))
.body(
"[0].jobDag.vertexInfoMap[1].tablePaths[0]",
equalTo("fake"))
.body(
"[0].jobDag.envOptions.'job.mode'",
equalTo("STREAMING"))
.body(
"[0].jobDag.envOptions.'checkpoint.interval'",
equalTo("5000"))
.body("[0].jobName", equalTo("fake_to_file"))
.body("[0].jobStatus", equalTo("RUNNING"));

Expand All @@ -293,6 +342,55 @@ public void testGetRunningJobs() {
+ RestConstant.RUNNING_JOBS_URL)
.then()
.statusCode(200)
.body(
"[0].jobDag.jobId",
equalTo(
Long.toString(
clientJobProxy
.getJobId())))
.body("[0].jobDag.pipelineEdges", hasKey("1"))
.body(
"[0].jobDag.pipelineEdges['1']",
hasSize(1))
.body(
"[0].jobDag.pipelineEdges['1'][0].inputVertexId",
equalTo("1"))
.body(
"[0].jobDag.pipelineEdges['1'][0].targetVertexId",
equalTo("2"))
.body("[0].jobDag.vertexInfoMap", hasSize(2))
.body(
"[0].jobDag.vertexInfoMap[0].vertexId",
equalTo(1))
.body(
"[0].jobDag.vertexInfoMap[0].type",
equalTo("source"))
.body(
"[0].jobDag.vertexInfoMap[0].vertexName",
equalTo(
"pipeline-1 [Source[0]-FakeSource]"))
.body(
"[0].jobDag.vertexInfoMap[0].tablePaths[0]",
equalTo("fake"))
.body(
"[0].jobDag.vertexInfoMap[1].vertexId",
equalTo(2))
.body(
"[0].jobDag.vertexInfoMap[1].type",
equalTo("sink"))
.body(
"[0].jobDag.vertexInfoMap[1].vertexName",
equalTo(
"pipeline-1 [Sink[0]-LocalFile-MultiTableSink]"))
.body(
"[0].jobDag.vertexInfoMap[1].tablePaths[0]",
equalTo("fake"))
.body(
"[0].jobDag.envOptions.'job.mode'",
equalTo("STREAMING"))
.body(
"[0].jobDag.envOptions.'checkpoint.interval'",
equalTo("5000"))
.body("[0].jobName", equalTo("fake_to_file"))
.body("[0].jobStatus", equalTo("RUNNING"));
}));
Expand All @@ -314,6 +412,57 @@ public void testGetJobInfoByJobId() {
+ batchJobProxy.getJobId())
.then()
.statusCode(200)
.body(
"jobDag.jobId",
equalTo(
Long.toString(
batchJobProxy.getJobId())))
.body("jobDag.pipelineEdges", hasKey("1"))
.body("jobDag.pipelineEdges['1']", hasSize(1))
.body(
"jobDag.pipelineEdges['1'][0].inputVertexId",
equalTo("1"))
.body(
"jobDag.pipelineEdges['1'][0].targetVertexId",
equalTo("2"))
.body("jobDag.vertexInfoMap", hasSize(2))
.body(
"jobDag.vertexInfoMap[0].vertexId",
equalTo(1))
.body(
"jobDag.vertexInfoMap[0].type",
equalTo("source"))
.body(
"jobDag.vertexInfoMap[0].vertexName",
equalTo(
"pipeline-1 [Source[0]-FakeSource]"))
.body(
"jobDag.vertexInfoMap[0].tablePaths[0]",
equalTo("fake"))
.body(
"jobDag.vertexInfoMap[1].vertexId",
equalTo(2))
.body(
"jobDag.vertexInfoMap[1].type",
equalTo("sink"))
.body(
"jobDag.vertexInfoMap[1].vertexName",
equalTo(
"pipeline-1 [Sink[0]-console-MultiTableSink]"))
.body(
"jobDag.vertexInfoMap[1].tablePaths[0]",
equalTo("fake"))
.body(
"metrics.TableSourceReceivedCount.fake",
equalTo("5"))
.body(
"metrics.TableSinkWriteCount.fake",
equalTo("5"))
.body("metrics.SinkWriteCount", equalTo("5"))
.body("metrics.SourceReceivedCount", equalTo("5"))
.body(
"jobDag.envOptions.'job.mode'",
equalTo("BATCH"))
.body("jobName", equalTo("fake_to_console"))
.body("jobStatus", equalTo("FINISHED"));

Expand Down Expand Up @@ -369,6 +518,17 @@ public void testGetJobInfoByJobId() {
.body(
"jobDag.vertexInfoMap[1].tablePaths[0]",
equalTo("fake"))
.body(
"metrics.TableSourceReceivedCount.fake",
equalTo("5"))
.body(
"metrics.TableSinkWriteCount.fake",
equalTo("5"))
.body("metrics.SinkWriteCount", equalTo("5"))
.body("metrics.SourceReceivedCount", equalTo("5"))
.body(
"jobDag.envOptions.'job.mode'",
equalTo("BATCH"))
.body("jobName", equalTo("fake_to_console"))
.body("jobStatus", equalTo("FINISHED"));
});
Expand Down
Loading
Loading