Skip to content

Commit 43c548a

Browse files
committed
HDDS-1555. Update to latest ratis version and add purge gap config.
1 parent 994ef66 commit 43c548a

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ public final class ScmConfigKeys {
107107
"dfs.container.ratis.log.appender.queue.byte-limit";
108108
public static final String
109109
DFS_CONTAINER_RATIS_LOG_APPENDER_QUEUE_BYTE_LIMIT_DEFAULT = "32MB";
110+
public static final String DFS_CONTAINER_RATIS_LOG_PURGE_GAP =
111+
"dfs.container.ratis.log.purge.gap";
112+
// TODO: Set to 1024 once RATIS issue around purge is fixed.
113+
public static final int DFS_CONTAINER_RATIS_LOG_PURGE_GAP_DEFAULT =
114+
1000000000;
110115
// expiry interval stateMachineData cache entry inside containerStateMachine
111116
public static final String
112117
DFS_CONTAINER_RATIS_STATEMACHINEDATA_CACHE_EXPIRY_INTERVAL =

hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConfigKeys.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,10 @@ public final class OzoneConfigKeys {
322322
public static final String
323323
DFS_CONTAINER_RATIS_LOG_APPENDER_QUEUE_BYTE_LIMIT_DEFAULT =
324324
ScmConfigKeys.DFS_CONTAINER_RATIS_LOG_APPENDER_QUEUE_BYTE_LIMIT_DEFAULT;
325+
public static final String DFS_CONTAINER_RATIS_LOG_PURGE_GAP =
326+
ScmConfigKeys.DFS_CONTAINER_RATIS_LOG_PURGE_GAP;
327+
public static final int DFS_CONTAINER_RATIS_LOG_PURGE_GAP_DEFAULT =
328+
ScmConfigKeys.DFS_CONTAINER_RATIS_LOG_PURGE_GAP_DEFAULT;
325329
public static final String DFS_RATIS_SERVER_REQUEST_TIMEOUT_DURATION_KEY =
326330
ScmConfigKeys.DFS_RATIS_SERVER_REQUEST_TIMEOUT_DURATION_KEY;
327331
public static final TimeDuration

hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ private RaftProperties newRaftProperties(Configuration conf) {
258258
RaftServerConfigKeys.Log.Appender.setInstallSnapshotEnabled(properties,
259259
false);
260260

261+
int purgeGap = conf.getInt(
262+
OzoneConfigKeys.DFS_CONTAINER_RATIS_LOG_PURGE_GAP,
263+
OzoneConfigKeys.DFS_CONTAINER_RATIS_LOG_PURGE_GAP_DEFAULT);
264+
RaftServerConfigKeys.Log.setPurgeGap(properties, purgeGap);
265+
261266
return properties;
262267
}
263268

hadoop-hdds/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
4747
<hdds.version>0.5.0-SNAPSHOT</hdds.version>
4848

4949
<!-- Apache Ratis version -->
50-
<ratis.version>0.4.0-300d9c5-SNAPSHOT</ratis.version>
50+
<ratis.version>0.4.0-2337318-SNAPSHOT</ratis.version>
5151

5252
<bouncycastle.version>1.60</bouncycastle.version>
5353

hadoop-ozone/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<hadoop.version>3.2.0</hadoop.version>
3030
<hdds.version>0.5.0-SNAPSHOT</hdds.version>
3131
<ozone.version>0.5.0-SNAPSHOT</ozone.version>
32-
<ratis.version>0.4.0-300d9c5-SNAPSHOT</ratis.version>
32+
<ratis.version>0.4.0-2337318-SNAPSHOT</ratis.version>
3333
<bouncycastle.version>1.60</bouncycastle.version>
3434
<ozone.release>Crater Lake</ozone.release>
3535
<declared.ozone.version>${ozone.version}</declared.ozone.version>

0 commit comments

Comments
 (0)