-
Notifications
You must be signed in to change notification settings - Fork 590
HDDS-10445. OM admin CLI to enable force fetching network topology tree from SCM #6304
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
|
@kerneltime, @duongkame could you please take a look? Thanks! |
|
Thanks for working on this, @tanvipenumudy. I don't see any tests written for it yet. Would you mind adding an integration test to verify your results, please? |
3cfdce4 to
f7f3bca
Compare
|
@adoroszlai could you please review the changes as well? Thanks! |
adoroszlai
left a comment
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 @tanvipenumudy for working on this.
The new command seems to work only with OM HA. I don't think this functionality should be limited to such setup.
...tools/src/main/java/org/apache/hadoop/ozone/admin/om/FetchNetworkTopologyTreeSubCommand.java
Outdated
Show resolved
Hide resolved
| scm = cluster.getStorageContainerManager(); | ||
| om = cluster.getOzoneManager(); | ||
| nodeManager = (SCMNodeManager) scm.getScmNodeManager(); | ||
| client = cluster.newClient(); |
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.
client needs to be closed in shutdown().
| ListStatusLight = 129; | ||
| GetSnapshotInfo = 130; | ||
| RenameSnapshot = 131; | ||
| RefetchNetworkTopologyTree = 132; |
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.
Let's omit Tree to make it a bit shorter. (Also in request/response, method and command names.)
| System.err.println("Force fetching network topology tree information " + | ||
| "has failed: " + e.getMessage()); | ||
| } | ||
| if (status) { | ||
| System.out.println( | ||
| "Force fetching network topology tree information " + | ||
| "is complete."); | ||
| } |
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 find this output a bit too verbose.
|
|
||
| @Override | ||
| public boolean refetchNetworkTopologyTree() { | ||
| return scmTopologyClient.refetchClusterTree(configuration); |
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 admin privilege should be required to make the request.
…/om/FetchNetworkTopologyTreeSubCommand.java Co-authored-by: Doroszlai, Attila <[email protected]>
|
@tanvipenumudy can we close this? |
|
Sure, marking the PR as closed. |
What changes were proposed in this pull request?
OM has a background thread running that periodically refetches the updated network topology layout information from SCM for the refresh duration frequency of every one hour (default).
This change introduces an OM admin CLI for force fetching the network topology tree information from SCM (on demand) without having to rely on the configuration:
ozone.om.network.topology.refresh.duration.CLI usage:
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10445
How was this patch tested?