-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Improve] Improve streampark-console core package module service name base on [3.1 Naming Style] #3295
Conversation
…e name base on [3.1 Naming Style]
Thanks very much for your contribution. There are some check style issues need to be resolved first. |
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.
Thx for the contribution.
I left a few of comments. PTAL in your free time.
...-service/src/main/java/org/apache/streampark/console/core/controller/VariableController.java
Outdated
Show resolved
Hide resolved
...service/src/main/java/org/apache/streampark/console/core/controller/YarnQueueController.java
Outdated
Show resolved
Hide resolved
...e-service/src/test/java/org/apache/streampark/console/core/service/YarnQueueServiceTest.java
Outdated
Show resolved
Hide resolved
...e-service/src/test/java/org/apache/streampark/console/core/service/YarnQueueServiceTest.java
Outdated
Show resolved
Hide resolved
Great!I'll fix it ASAP. |
cc @RocMarshal |
Thx |
...console-service/src/main/java/org/apache/streampark/console/core/service/ProjectService.java
Outdated
Show resolved
Hide resolved
@@ -27,7 +27,7 @@ | |||
|
|||
public interface YarnQueueService extends IService<YarnQueue> { | |||
|
|||
IPage<YarnQueue> findYarnQueues(YarnQueue yarnQueue, RestRequest restRequest); | |||
IPage<YarnQueue> getPage(YarnQueue yarnQueue, RestRequest restRequest); |
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.
getYarnQueuesPage?
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.
yarnQueueService.getPage
already mentioned yarnQueue
|
||
boolean checkExists(Project project); | ||
boolean exists(Project project); |
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 checkExists better
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.
Difference:
void checkExists(Project project) {
if (notExists) {
throw new ProjectNotExistsException();
}
}
As a result:
if (!exists(project)) {
throw new ProjectNotExistsException();
}
Alternatively, it could be simplified as:
checkExist(project);
This approach is preferred since the "exists" method merely returns a boolean value, which enhances clarity and conciseness.
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 @VampireAchao for the improvement and @caicancai for the review.
LGTM +1~
What changes were proposed in this pull request
Issue Number: see #3064
Brief change log
Improve streampark-console core package module service name base on [3.1 Naming Style]
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Yes (or)
This change is already covered by existing tests, such as (please describe tests).
No (or)
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts