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] [REST-API] Fixed the problem that the return list is empty due to no status parameters #6040

Merged
merged 2 commits into from
Dec 22, 2023

Conversation

liugddx
Copy link
Member

@liugddx liugddx commented Dec 19, 2023

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
Copy link

sheng-jie commented Dec 20, 2023

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
Copy link
Member Author

liugddx commented Dec 20, 2023

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

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
Copy link

sheng-jie commented Dec 21, 2023

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
Copy link
Member Author

liugddx commented Dec 21, 2023

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
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.

Copy link
Member

@Hisoka-X Hisoka-X left a comment

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
7 checks passed
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
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