-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDDS-1550. MiniOzoneCluster is not shutting down all the threads during shutdown. Contributed by Mukul Kumar Singh. #829
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
Conversation
… during shutdown. Contributed by Mukul Kumar Singh.
💔 -1 overall
This message was automatically generated. |
try { | ||
executorService.awaitTermination(1, TimeUnit.DAYS); | ||
} catch (Exception e) { | ||
LOG.error("failed to shutdown Report Manager", 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.
The first letter of the first word as a capital letter maybe 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.
Do you want timeUnit to be Days?
private final OzoneConfiguration configuration; | ||
private final SafeModeHandler safeModeHandler; | ||
private SCMContainerMetrics scmContainerMetrics; | ||
private MetricsSystem ms; |
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.
Suggest modify the instance variable name, so that it readability.
conf.setTimeDuration(HddsConfigKeys.HDDS_HEARTBEAT_INTERVAL, 1, | ||
TimeUnit.SECONDS); | ||
conf.setInt(OzoneConfigKeys.OZONE_CONTAINER_CACHE_SIZE, 8); | ||
conf.setInt(OzoneConfigKeys.OZONE_CONTAINER_CACHE_SIZE, 2); |
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.
What's the purpose of change the cache size?
if (isStarted) { | ||
server.shutdown(); | ||
try { | ||
server.awaitTermination(1, TimeUnit.DAYS); |
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.
It's better to read the value from configuration file.
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.
Same question as above.
Thanks @mukul1987 for working on this. i am +1 on this. The patch looks good to me. Please address @jiwq comments, while committing. |
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 have few minor comments. Overall patch LGTM.
metrics.unRegister(); | ||
} | ||
|
||
if (ms != null) { |
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.
in order of precedence, i think closing scmMetadataStore takes more precedence than Metrics. Shall we move this close statement to end.
LOG.info("Shutting the HddsDatanodes"); | ||
hddsDatanodes.parallelStream() | ||
.forEach(dn -> { | ||
dn.stop(); |
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.
shall we wrap them in try catch to cleanup all of them silently.
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 the review Ajay, I didnot understand this comment completely. Can you please elaborate. ?
I am also +1, but I really agree with @bharatviswa504 , we probably should not wait for a day for the MiniOzoneCluster to shutdown. +1 after fixing that issue. |
…tion processing code This PR also refactors TestSamzaSqlRemoteTable to be in samza-test instead of samza-sql, since it seems to actually be an integration test. It is useful to move that test in this PR so that tests that may need an external context can be consolidated. Author: Cameron Lee <[email protected]> Reviewers: Prateek Maheshwari <[email protected]>, Shanthoosh Venkatraman <[email protected]> Closes apache#829 from cameronlee314/external_context
MiniOzoneCluster is not shutting down all the threads during shutdown. this patch tries to fix that issue.