-
Notifications
You must be signed in to change notification settings - Fork 520
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
feat(server): support single computer do schedule task #2676
base: master
Are you sure you want to change the base?
feat(server): support single computer do schedule task #2676
Conversation
Signed-off-by: shirley118146 <shirley118146@gmail.com>
Signed-off-by: shirley118146 <shirley118146@gmail.com>
Signed-off-by: shirley118146 <shirley118146@gmail.com>
@imbajin PTAL~ |
@imbajin I updated the test case to the PR description. PTAL ~~ |
@dosu how to rerun "HugeGraph-Server CI / build-server (hbase, 11)" |
2024-10-22.22.40.08.mov |
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 your contribution.
Can I know in what scenario you need to do this?
|
||
boolean singleNode = !hasWorkerNode||computerNodeCount==1; | ||
if (singleNode != this.onlySingleNode) { | ||
LOG.info("Switch only_single_node 02 to {}", singleNode); |
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.
not sure 02
means what
} | ||
if (server.role().master()) { | ||
continue; | ||
}else if (server.role().computer()){ |
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.
add a space after '}', or remove 'else'
return this.selfNodeRole() != null && this.selfNodeRole().master(); | ||
public boolean selfIsMasterOrSingleComputer() { | ||
boolean isMaster=this.selfNodeRole() != null && this.selfNodeRole().master(); | ||
boolean isSingleComputer=isStandAloneComputer(); |
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.
expect spaces " = "
return this.selfNodeRole() != null && this.selfNodeRole().computer(); | ||
} | ||
|
||
public boolean isStandAloneComputer(){ |
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.
unused method?
Purpose of the PR
Main Changes
Verifying these changes
Does this PR potentially affect the following parts?
Documentation Status
Doc - TODO
Doc - Done
Doc - No Need