-
Notifications
You must be signed in to change notification settings - Fork 41
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
refact(core): adaptor for common 1.2 & fix a string of possible CI problem #286
Conversation
This exception in CI seems to be caused by common 1.2 |
Yes, I'll adapt it soon (already marked in the commons PR) |
This reverts commit 3e894d3.
masterService.init(config); | ||
masterService.execute(); | ||
} catch (Throwable e) { | ||
LOG.error("Failed to start master", e); | ||
exceptions[2] = e; | ||
} finally { | ||
masterService.close(); | ||
countDownLatch.countDown(); |
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.
We need to close the worker if master failed, otherwise the main thread won't be able to finish.
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.
We need to close the worker if master failed, otherwise the main thread won't be able to finish.
Seems in this case, master close() in the end of the test? (and how could we close worker here)
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.
Seems in this case, master close() in the end of the test?
I think so.
how could we close worker here
We can call workerService.close()
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.
We can call workerService.close()
but in this case we can't call it because the worker service scope is not shared/enough (In other case we could do that)
@@ -114,9 +113,9 @@ public void init(Config config) { | |||
LOG.info("{} register MasterService", this); | |||
this.bsp4Master.masterInitDone(this.masterInfo); | |||
|
|||
this.workers = this.bsp4Master.waitWorkersInitDone(); | |||
List<ContainerInfo> workers = this.bsp4Master.waitWorkersInitDone(); |
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 don't assign value to this.workers
?
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.
seems not used in other space.. (only defined in the global but not used besides here)
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.
Oh, it's better to print the workers' information so troubleshooting.
computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerService.java
Outdated
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerService.java
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/master/MasterService.java
Show resolved
Hide resolved
…/worker/WorkerService.java Co-authored-by: Cong Zhao <zhaocong@apache.org>
checkstyle.xml
Outdated
@@ -35,7 +35,7 @@ | |||
<module name="TreeWalker"> | |||
<!--检查行长度--> | |||
<module name="LineLength"> | |||
<property name="max" value="100"/> | |||
<property name="max" value="105"/> |
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.
prefer don't break the rule
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.
Update to 101 & add the comment
computer-core/src/main/java/org/apache/hugegraph/computer/core/master/MasterService.java
Outdated
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerService.java
Outdated
Show resolved
Hide resolved
this.managers.initedAll(this.config); | ||
LOG.info("{} WorkerService initialized", this); | ||
this.inited = true; | ||
} catch (Exception e) { |
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.
don't need to try-catch and just log here
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.
don't need to try-catch and just log here
seems without try-catch
the log won't print if exception throws before it
computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerService.java
Outdated
Show resolved
Hide resolved
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.
LGTM
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