adoroszlai commented on code in PR #8235:
URL: https://github.com/apache/ozone/pull/8235#discussion_r2030110981
##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -1154,6 +1162,14 @@
if the default value for this config is not used.
</description>
</property>
+ <property>
+ <name>hdds.initial.heartbeat.interval</name>
+ <value>2s</value>
+ <tag>OZONE, MANAGEMENT</tag>
+ <description>
+ Heartbeat interval used during Datanode initialization for Datanode.
Review Comment:
```suggestion
Heartbeat interval used during Datanode initialization for SCM.
```
##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java:
##########
@@ -138,6 +138,22 @@ private MiniOzoneClusterImpl(OzoneConfiguration conf,
this.services = services;
}
+ /**
+ * Creates a new MiniOzoneCluster with Recon.
+ */
+ private MiniOzoneClusterImpl(OzoneConfiguration conf,
+ SCMConfigurator scmConfigurator,
+ StorageContainerManager scm,
+ List<HddsDatanodeService> hddsDatanodes,
+ ReconServer reconServer, List<Service> services) {
+ this.conf = conf;
+ this.scm = scm;
+ this.hddsDatanodes = hddsDatanodes;
+ this.reconServer = reconServer;
+ this.scmConfigurator = scmConfigurator;
+ this.services = services;
+ }
+
Review Comment:
This is unused, let's not add it.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/RatisUtil.java:
##########
@@ -138,6 +138,14 @@ private static void setRaftRpcProperties(final
RaftProperties properties,
OZONE_SCM_HA_RATIS_NODE_FAILURE_TIMEOUT_DEFAULT,
TimeUnit.MILLISECONDS),
TimeUnit.MILLISECONDS));
+ long firstElectionTimeout = ozoneConf.getTimeDuration(
+ ScmConfigKeys.OZONE_SCM_HA_RATIS_SERVER_RPC_FIRST_ELECTION_TIMEOUT,
-1, TimeUnit.MILLISECONDS);
+ if (firstElectionTimeout > 0) {
+ Rpc.setFirstElectionTimeoutMin(
+ properties, TimeDuration.valueOf(firstElectionTimeout,
TimeUnit.MILLISECONDS));
+ Rpc.setFirstElectionTimeoutMax(
+ properties, TimeDuration.valueOf(firstElectionTimeout + 200,
TimeUnit.MILLISECONDS));
+ }
Review Comment:
Please extract a function for this, with config key as input. It can be
reused for `XceiverServerRatis`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]