Skip to content

Commit 34a331b

Browse files
committed
HDDS-1205. Refactor ReplicationManager to handle QUASI_CLOSED containers. Contributed by Nanda kumar.
1 parent 509b20b commit 34a331b

File tree

11 files changed

+1485
-54
lines changed

11 files changed

+1485
-54
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,18 @@ public final class ScmConfigKeys {
348348
public static final String HDDS_SCM_WATCHER_TIMEOUT_DEFAULT =
349349
"10m";
350350

351+
public static final String HDDS_SCM_REPLICATION_THREAD_INTERVAL =
352+
"hdds.scm.replication.thread.interval";
353+
354+
public static final String HDDS_SCM_REPLICATION_THREAD_INTERVAL_DEFAULT =
355+
"5m";
356+
357+
public static final String HDDS_SCM_REPLICATION_EVENT_TIMEOUT =
358+
"hdds.scm.replication.event.timeout";
359+
360+
public static final String HDDS_SCM_REPLICATION_EVENT_TIMEOUT_DEFAULT =
361+
"10m";
362+
351363
public static final String
352364
HDDS_SCM_HTTP_KERBEROS_PRINCIPAL_KEY =
353365
"hdds.scm.http.kerberos.principal";

hadoop-hdds/common/src/main/resources/ozone-default.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,4 +2357,24 @@
23572357
Request to flush the OM DB before taking checkpoint snapshot.
23582358
</description>
23592359
</property>
2360+
<property>
2361+
<name>hdds.scm.replication.thread.interval</name>
2362+
<value>5m</value>
2363+
<tag>OZONE, SCM</tag>
2364+
<description>
2365+
There is a replication monitor thread running inside SCM which
2366+
takes care of replicating the containers in the cluster. This
2367+
property is used to configure the interval in which that thread
2368+
runs.
2369+
</description>
2370+
</property>
2371+
<property>
2372+
<name>hdds.scm.replication.event.timeout</name>
2373+
<value>10m</value>
2374+
<tag>OZONE, SCM</tag>
2375+
<description>
2376+
Timeout for the container replication/deletion commands sent
2377+
to datanodes. After this timeout the command will be retried.
2378+
</description>
2379+
</property>
23602380
</configuration>

hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerManager.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
3434
*/
3535
public interface ContainerManager extends Closeable {
3636

37+
38+
/**
39+
* Returns all the container Ids managed by ContainerManager.
40+
*
41+
* @return Set of ContainerID
42+
*/
43+
Set<ContainerID> getContainerIDs();
44+
3745
/**
3846
* Returns all the containers managed by ContainerManager.
3947
*

0 commit comments

Comments
 (0)