-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Feature][Engine] Change the name of the rest-api interface for returning job info #6813
Conversation
…b details was changed from running-job to job-info apache#6812
…b details was changed from running-job to job-info apache#6812
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hawk9821 for create this PR! I think your point is right. But we'd better not modify the old url api, but create a new api and mark the old one as deprecated. This will ensure backward compatibility.
…b details was changed from running-job to job-info apache#6812
…b details was changed from running-job to job-info apache#6812
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for update!
docs/en/seatunnel-engine/rest-api.md
Outdated
|
||
------------------------------------------------------------------------------------------ | ||
|
||
### Return details of a job @Deprecated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Return details of a job @Deprecated. | |
### Return details of a job. This API has been deprecated, please use /hazelcast/rest/maps/job-info/:jobId instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
docs/zh/seatunnel-engine/rest-api.md
Outdated
|
||
------------------------------------------------------------------------------------------ | ||
|
||
### 返回作业的详细信息(已弃用)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### 返回作业的详细信息(已弃用)。 | |
### 返回作业的详细信息。此API已经启用,请使用/hazelcast/rest/maps/job-info/:jobId替代 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
|
||
public class RestHttpGetCommandProcessor extends HttpCommandProcessor<HttpGetCommand> { | ||
public static class RestHttpGetCommandProcessor extends HttpCommandProcessor<HttpGetCommand> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mvn spotless:apply,missed check . modified
@@ -300,6 +296,54 @@ private void handleJobInfoById(HttpGetCommand command, String uri) { | |||
} | |||
} | |||
|
|||
private void handleJobInfoByJobId(HttpGetCommand command, String uri) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can reuse handleJobInfoById
method, not create new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
…b details was changed from running-job to job-info apache#6812
…b details was changed from running-job to job-info apache#6812
IMap<Object, Object> jobInfoMap = | ||
this.textCommandService | ||
.getNode() | ||
.getNodeEngine() | ||
.getHazelcastInstance() | ||
.getMap(Constant.IMAP_RUNNING_JOB_INFO); | ||
JobInfo jobInfo = (JobInfo) jobInfoMap.get(Long.valueOf(jobId)); | ||
IMap<Object, Object> finishedJobStateMap = | ||
this.textCommandService | ||
.getNode() | ||
.getNodeEngine() | ||
.getHazelcastInstance() | ||
.getMap(Constant.IMAP_FINISHED_JOB_STATE); | ||
JobState finishedJobState = (JobState) finishedJobStateMap.get(Long.valueOf(jobId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for change this? Seem like no difference between before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feeling a little strange. cc @hailin0 @EricJoy2048
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, it will not affect result of now.
…b details was changed from running-job to job-info #6812
Purpose of this pull request
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note
.