close
Skip to content

[Bugfix] [REST-API] Fixed the problem that the return list is empty due to no status parameters#6040

Merged
hailin0 merged 2 commits into
apache:devfrom
liugddx:bugfix-19
Dec 22, 2023
Merged

[Bugfix] [REST-API] Fixed the problem that the return list is empty due to no status parameters#6040
hailin0 merged 2 commits into
apache:devfrom
liugddx:bugfix-19

Conversation

@liugddx

@liugddx liugddx commented Dec 19, 2023

Copy link
Copy Markdown
Member

Purpose of this pull request

close #6037

Does this PR introduce any user-facing change?

No

How was this patch tested?

Already covered

Check list

@sheng-jie

sheng-jie commented Dec 20, 2023

Copy link
Copy Markdown

I passed the state parameter in the url actually: http://localhost:5801/hazelcast/rest/maps/finished-jobs/FINISHED.

So this fix may not solve the bug #6037 .

@liugddx

liugddx commented Dec 20, 2023

Copy link
Copy Markdown
Member Author

I passed the state parameter in the url actually: http://localhost:5801/hazelcast/rest/maps/finished-jobs/FINISHED.

So this fix may not solve the bug #6037 .

Can you send the specific error message?

@sheng-jie

Copy link
Copy Markdown

I passed the state parameter in the url actually: http://localhost:5801/hazelcast/rest/maps/finished-jobs/FINISHED.

So this fix may not solve the bug #6037 .

Can you send the specific error message?

Sorry for my mistake, it's ok now.Thanks
.

@liugddx liugddx self-assigned this Dec 21, 2023
@sheng-jie

sheng-jie commented Dec 21, 2023

Copy link
Copy Markdown

I found another issue: The metrics were not serialized in CamelCase format.

curl --location --request GET 'http://seatunnel-svc:5801/hazelcast/rest/maps/finished-jobs/FINISHED' \
--header 'User-Agent: Apifox/1.0.0 (https://www.apifox.cn)' \
--header 'Accept: */*' \
--header 'Host: seatunnel-svc:5801' \
--header 'Connection: keep-alive'

[
    {
        "jobId": "790041833823535105",
        "jobName": "fake-to-console",
        "jobStatus": "FINISHED",
        "errorMsg": null,
        "createTime": "2023-12-21 02:24:11",
        "finishTime": "2023-12-21 02:24:13",
        "jobDag": {
            "jobId": 790041833823535105,
            "pipelineEdges": {
                "1": [
                    {
                        "inputVertexId": 1,
                        "targetVertexId": 2
                    }
                ]
            },
            "vertexInfoMap": {
                "1": {
                    "vertexId": 1,
                    "type": "SOURCE",
                    "connectorType": "pipeline-1 [Source[0]-FakeSource]"
                },
                "2": {
                    "vertexId": 2,
                    "type": "SINK",
                    "connectorType": "pipeline-1 [Sink[0]-Console-MultiTableSink]"
                }
            }
        },
        "metrics": {
            "SourceReceivedCount": "10000",
            "SinkWriteCount": "10000"
        }
    }
]

@liugddx

liugddx commented Dec 21, 2023

Copy link
Copy Markdown
Member Author

I found another issue: The metrics were not serialized in CamelCase format.

curl --location --request GET 'http://seatunnel-svc:5801/hazelcast/rest/maps/finished-jobs/FINISHED' \
--header 'User-Agent: Apifox/1.0.0 (https://www.apifox.cn)' \
--header 'Accept: */*' \
--header 'Host: seatunnel-svc:5801' \
--header 'Connection: keep-alive'

[
    {
        "jobId": "790041833823535105",
        "jobName": "fake-to-console",
        "jobStatus": "FINISHED",
        "errorMsg": null,
        "createTime": "2023-12-21 02:24:11",
        "finishTime": "2023-12-21 02:24:13",
        "jobDag": {
            "jobId": 790041833823535105,
            "pipelineEdges": {
                "1": [
                    {
                        "inputVertexId": 1,
                        "targetVertexId": 2
                    }
                ]
            },
            "vertexInfoMap": {
                "1": {
                    "vertexId": 1,
                    "type": "SOURCE",
                    "connectorType": "pipeline-1 [Source[0]-FakeSource]"
                },
                "2": {
                    "vertexId": 2,
                    "type": "SINK",
                    "connectorType": "pipeline-1 [Sink[0]-Console-MultiTableSink]"
                }
            }
        },
        "metrics": {
            "SourceReceivedCount": "10000",
            "SinkWriteCount": "10000"
        }
    }
]

Thanks for reminding me, I will enrich the metrics in another PR.

EricJoy2048
EricJoy2048 previously approved these changes Dec 21, 2023
@EricJoy2048

Copy link
Copy Markdown
Member

I found another issue: The metrics were not serialized in CamelCase format.

curl --location --request GET 'http://seatunnel-svc:5801/hazelcast/rest/maps/finished-jobs/FINISHED' \
--header 'User-Agent: Apifox/1.0.0 (https://www.apifox.cn)' \
--header 'Accept: */*' \
--header 'Host: seatunnel-svc:5801' \
--header 'Connection: keep-alive'

[
    {
        "jobId": "790041833823535105",
        "jobName": "fake-to-console",
        "jobStatus": "FINISHED",
        "errorMsg": null,
        "createTime": "2023-12-21 02:24:11",
        "finishTime": "2023-12-21 02:24:13",
        "jobDag": {
            "jobId": 790041833823535105,
            "pipelineEdges": {
                "1": [
                    {
                        "inputVertexId": 1,
                        "targetVertexId": 2
                    }
                ]
            },
            "vertexInfoMap": {
                "1": {
                    "vertexId": 1,
                    "type": "SOURCE",
                    "connectorType": "pipeline-1 [Source[0]-FakeSource]"
                },
                "2": {
                    "vertexId": 2,
                    "type": "SINK",
                    "connectorType": "pipeline-1 [Sink[0]-Console-MultiTableSink]"
                }
            }
        },
        "metrics": {
            "SourceReceivedCount": "10000",
            "SinkWriteCount": "10000"
        }
    }
]

Thanks for reminding me, I will enrich the metrics in another PR.

Please create an issue for it, let us not lost it.

@Hisoka-X Hisoka-X left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add test case to avoid regression.

@hailin0 hailin0 merged commit 895089e into apache:dev Dec 22, 2023
alextinng pushed a commit to alextinng/seatunnel that referenced this pull request Dec 22, 2023
chaorongzhi pushed a commit to chaorongzhi/seatunnel that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [REST-API] Cannot get finished job status with new api /hazelcast/rest/maps/finished-jobs/:state

5 participants