-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-14108. Provide option in ‘scm safemode status’ to show status of all SCM nodes #9611
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
base: master
Are you sure you want to change the base?
Changes from 4 commits
14173ff
5958634
4b95b95
dc935e6
5fbe051
8dd43f6
836c36c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1033,6 +1033,42 @@ public Map<String, Pair<Boolean, String>> getSafeModeRuleStatuses() | |||||
| } | ||||||
| } | ||||||
|
|
||||||
| @Override | ||||||
| public boolean inSafeModeForNode(String nodeId) throws IOException { | ||||||
| Map<String, String> auditMap = Maps.newHashMap(); | ||||||
| auditMap.put("nodeId", nodeId); | ||||||
| try { | ||||||
| boolean result = inSafeMode(); | ||||||
|
||||||
| boolean result = inSafeMode(); | |
| boolean result = scm.isInSafeMode(); |
It’s better to use scm.isInSafeMode() instead of inSafeMode(), since inSafeMode() is a generic API and may evolve in the future (for example, to include leader-level logic). Using scm.isInSafeMode() makes it explicit that we are returning the local SCM node’s safe mode state.
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.
nit: FOLLOWER_READABLE_COMMAND_TYPES