Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -443,78 +443,6 @@ public final class ScmConfigKeys {
= "ozone.scm.grpc.port";
public static final int OZONE_SCM_GRPC_PORT_DEFAULT
= 9895;
public static final String OZONE_SCM_RATIS_RPC_TYPE_KEY
= "ozone.scm.ratis.rpc.type";
public static final String OZONE_SCM_RATIS_RPC_TYPE_DEFAULT
= "GRPC";

// SCM Ratis Log configurations
public static final String OZONE_SCM_RATIS_STORAGE_DIR
= "ozone.scm.ratis.storage.dir";
public static final String OZONE_SCM_RATIS_SEGMENT_SIZE_KEY
= "ozone.scm.ratis.segment.size";
public static final String OZONE_SCM_RATIS_SEGMENT_SIZE_DEFAULT
= "16KB";
public static final String OZONE_SCM_RATIS_SEGMENT_PREALLOCATED_SIZE_KEY
= "ozone.scm.ratis.segment.preallocated.size";
public static final String OZONE_SCM_RATIS_SEGMENT_PREALLOCATED_SIZE_DEFAULT
= "16KB";

// SCM Ratis Log Appender configurations
public static final String
OZONE_SCM_RATIS_LOG_APPENDER_QUEUE_NUM_ELEMENTS =
"ozone.scm.ratis.log.appender.queue.num-elements";
public static final int
OZONE_SCM_RATIS_LOG_APPENDER_QUEUE_NUM_ELEMENTS_DEFAULT = 1024;
public static final String OZONE_SCM_RATIS_LOG_APPENDER_QUEUE_BYTE_LIMIT =
"ozone.scm.ratis.log.appender.queue.byte-limit";
public static final String
OZONE_SCM_RATIS_LOG_APPENDER_QUEUE_BYTE_LIMIT_DEFAULT = "32MB";
public static final String OZONE_SCM_RATIS_LOG_PURGE_GAP =
"ozone.scm.ratis.log.purge.gap";
public static final int OZONE_SCM_RATIS_LOG_PURGE_GAP_DEFAULT = 1000000;

// SCM Ratis server configurations
public static final String OZONE_SCM_RATIS_SERVER_REQUEST_TIMEOUT_KEY
= "ozone.scm.ratis.server.request.timeout";
public static final TimeDuration
OZONE_SCM_RATIS_SERVER_REQUEST_TIMEOUT_DEFAULT
= TimeDuration.valueOf(3000, TimeUnit.MILLISECONDS);
public static final String
OZONE_SCM_RATIS_SERVER_RETRY_CACHE_TIMEOUT_KEY
= "ozone.scm.ratis.server.retry.cache.timeout";
public static final TimeDuration
OZONE_SCM_RATIS_SERVER_RETRY_CACHE_TIMEOUT_DEFAULT
= TimeDuration.valueOf(600000, TimeUnit.MILLISECONDS);
public static final String OZONE_SCM_RATIS_MINIMUM_TIMEOUT_KEY
= "ozone.scm.ratis.minimum.timeout";
public static final TimeDuration OZONE_SCM_RATIS_MINIMUM_TIMEOUT_DEFAULT
= TimeDuration.valueOf(1, TimeUnit.SECONDS);

public static final String OZONE_SCM_RATIS_REQUEST_TIMEOUT_KEY
= "ozone.scm.ratis.minimum.timeout";
public static final String OZONE_SCM_RATIS_REQUEST_TIMEOUT_DEFAULT
= "30s";

// SCM Ratis Leader Election configurations
public static final String
OZONE_SCM_LEADER_ELECTION_MINIMUM_TIMEOUT_DURATION_KEY =
"ozone.scm.ratis.leader.election.minimum.timeout.duration";
public static final TimeDuration
OZONE_SCM_LEADER_ELECTION_MINIMUM_TIMEOUT_DURATION_DEFAULT =
TimeDuration.valueOf(1, TimeUnit.SECONDS);
public static final String OZONE_SCM_RATIS_SERVER_FAILURE_TIMEOUT_DURATION_KEY
= "ozone.scm.ratis.server.failure.timeout.duration";
public static final TimeDuration
OZONE_SCM_RATIS_SERVER_FAILURE_TIMEOUT_DURATION_DEFAULT
= TimeDuration.valueOf(120, TimeUnit.SECONDS);

// SCM Leader server role check interval
public static final String OZONE_SCM_RATIS_SERVER_ROLE_CHECK_INTERVAL_KEY
= "ozone.scm.ratis.server.role.check.interval";
public static final TimeDuration
OZONE_SCM_RATIS_SERVER_ROLE_CHECK_INTERVAL_DEFAULT
= TimeDuration.valueOf(15, TimeUnit.SECONDS);

public static final String OZONE_SCM_DATANODE_ADMIN_MONITOR_INTERVAL =
"ozone.scm.datanode.admin.monitor.interval";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ public class SCMHAConfiguration {

@Config(key = "ratis.request.timeout",
type = ConfigType.TIME,
defaultValue = "3000ms",
defaultValue = "30s",
tags = {SCM, OZONE, HA, RATIS},
description = "The timeout duration for SCM's Ratis server RPC."
)
private long ratisRequestTimeout = 3000L;
private long ratisRequestTimeout = 30 * 1000L;

@Config(key = "ratis.server.retry.cache.timeout",
type = ConfigType.TIME,
Expand Down
122 changes: 0 additions & 122 deletions hadoop-hdds/common/src/main/resources/ozone-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2053,128 +2053,6 @@
</description>
</property>

<property>
<name>ozone.scm.ratis.rpc.type</name>
<value>GRPC</value>
<tag>OZONE, SCM, HA, RATIS</tag>
<description>Ratis supports different kinds of transports like netty, GRPC,
Hadoop RPC etc. This picks one of those for this cluster.
</description>
</property>

<property>
<name>ozone.scm.ratis.storage.dir</name>
<value/>
<tag>OZONE, SCM, HA, RATIS, STORAGE</tag>
<description>This directory is used for storing SCM's Ratis metadata like
logs. If this is not set then default metadata dirs is used. A warning
will be logged if this not set. Ideally, this should be mapped to a
fast disk like an SSD.
If undefined, SCM ratis storage dir will fallback to ozone.metadata.dirs.
This fallback approach is not recommended for production environments.
</description>
</property>

<property>
<name>ozone.scm.ratis.segment.size</name>
<value>16KB</value>
<tag>OZONE, SCM, HA, RATIS, PERFORMANCE</tag>
<description>The size of the raft segment used by Apache Ratis on SCM.
(16 KB by default)
</description>
</property>

<property>
<name>ozone.scm.ratis.segment.preallocated.size</name>
<value>16KB</value>
<tag>OZONE, SCM, HA, RATIS, PERFORMANCE</tag>
<description>The size of the buffer which is preallocated for raft segment
used by Apache Ratis on SCM.(16 KB by default)
</description>
</property>

<property>
<name>ozone.scm.ratis.log.appender.queue.num-elements</name>
<value>1024</value>
<tag>OZONE, DEBUG, SCM, HA, RATIS</tag>
<description>Number of operation pending with Raft's Log Worker.
</description>
</property>
<property>
<name>ozone.scm.ratis.log.appender.queue.byte-limit</name>
<value>32MB</value>
<tag>OZONE, DEBUG, SCM, HA, RATIS</tag>
<description>Byte limit for Raft's Log Worker queue.
</description>
</property>
<property>
<name>ozone.scm.ratis.log.purge.gap</name>
<value>1000000</value>
<tag>OZONE, SCM, HA, RATIS</tag>
<description>The minimum gap between log indices for Raft server to purge
its log segments after taking snapshot.
</description>
</property>
<property>
<name>ozone.scm.ratis.server.request.timeout</name>
<value>3s</value>
<tag>OZONE, SCM, HA, RATIS</tag>
<description>The timeout duration for SCM's ratis server request.</description>
</property>

<property>
<name>ozone.scm.ratis.server.retry.cache.timeout</name>
<value>600000ms</value>
<tag>OZONE, SCM, HA, RATIS</tag>
<description>Retry Cache entry timeout for SCM's ratis server.</description>
</property>

<property>
<name>ozone.scm.ratis.minimum.timeout</name>
<value>1s</value>
<tag>OZONE, SCM, HA, RATIS</tag>
<description>The minimum timeout duration for SCM's Ratis server rpc.
</description>
</property>

<property>
<name>ozone.scm.ratis.minimum.timeout</name>
<value>30s</value>
<tag>OZONE, SCM, HA, RATIS</tag>
<description>The request timeout duration for SCM's Ratis server request.
</description>
</property>

<property>
<name>ozone.scm.ratis.leader.election.minimum.timeout.duration</name>
<value>1s</value>
<tag>OZONE, SCM, HA, RATIS</tag>
<description>The minimum timeout duration for SCM ratis leader election.
Default is 1s.
</description>
</property>

<property>
<name>ozone.scm.ratis.server.failure.timeout.duration</name>
<value>120s</value>
<tag>OZONE, SCM, HA, RATIS</tag>
<description>The timeout duration for ratis server failure detection,
once the threshold has reached, the ratis state machine will be informed
about the failure in the ratis ring.
</description>
</property>

<property>
<name>ozone.scm.ratis.server.role.check.interval</name>
<value>15s</value>
<tag>OZONE, SCM, HA, RATIS</tag>
<description>The interval between SCM leader performing a role
check on its ratis server. Ratis server informs SCM if it
loses the leader role. The scheduled check is an secondary
check to ensure that the leader role is updated periodically
.</description>
</property>

<property>
<name>hdds.metadata.dir</name>
<value/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.protocol.proto.SCMRatisProtocol.RequestType;
import org.apache.hadoop.hdds.scm.AddSCMRequest;
import org.apache.hadoop.hdds.scm.ScmConfigKeys;
import org.apache.hadoop.hdds.scm.server.StorageContainerManager;
import org.apache.hadoop.net.NetUtils;
import org.apache.hadoop.hdds.security.x509.SecurityConfig;
Expand Down Expand Up @@ -206,10 +205,9 @@ public SCMRatisResponse submitRequest(SCMRatisRequest request)
.setType(RaftClientRequest.writeRequestType())
.build();
// any request submitted to
final long requestTimeout = scm.getConfiguration()
.getTimeDuration(ScmConfigKeys.OZONE_SCM_RATIS_REQUEST_TIMEOUT_KEY,
ScmConfigKeys.OZONE_SCM_RATIS_REQUEST_TIMEOUT_DEFAULT,
TimeUnit.MILLISECONDS);
final long requestTimeout =
scm.getConfiguration().getObject(SCMHAConfiguration.class)
.getRatisRequestTimeout();
final RaftClientReply raftClientReply =
server.submitClientRequestAsync(raftClientRequest)
.get(requestTimeout, TimeUnit.MILLISECONDS);
Expand Down