bharatviswa504 commented on a change in pull request #2260:
URL: https://github.com/apache/ozone/pull/2260#discussion_r634484439
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
##########
@@ -1708,4 +1708,17 @@ ContainerTokenSecretManager
getContainerTokenSecretManager() {
return containerTokenMgr;
}
+ @Override
+ public List<String> getScmRatisRoles() throws IOException {
+ return getScmHAManager().getRatisServer().getRatisRoles();
+ }
+
+ @Override
+ public String getPrimordialNode() {
+ if (SCMHAUtils.isSCMHAEnabled(configuration)) {
+ return SCMHAUtils.getPrimordialSCM(configuration);
+ }
+ return null;
Review comment:
If config primordial node is not defined, the node which is performed is
considered as primordial SCM.
We persist scmID in the version file but not the hostname. So, I don't see a
way we can figure out primordial SCM. So, I believe we should be okay here if
the config is not defined return null (And print some message that init
performed node is considered as primordial SCM)
cc @bshashikant for comments
And also primordial SCM can be nodeID/hostName. If it is nodeID, get the
hostName from SCMNodeDetails and use that.
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
##########
@@ -1708,4 +1708,17 @@ ContainerTokenSecretManager
getContainerTokenSecretManager() {
return containerTokenMgr;
}
+ @Override
+ public List<String> getScmRatisRoles() throws IOException {
+ return getScmHAManager().getRatisServer().getRatisRoles();
Review comment:
Can we format as String in a readable way, instead of the current format
using StringBuilder?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]