This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 44ba9a3f5d HDDS-12023. Enable SCM Ratis in TestContainerCommandsEC
(#7650)
44ba9a3f5d is described below
commit 44ba9a3f5d689d003cc8770ad62815d04d2596a2
Author: Chung En Lee <[email protected]>
AuthorDate: Tue Jan 7 16:14:24 2025 +0800
HDDS-12023. Enable SCM Ratis in TestContainerCommandsEC (#7650)
---
.../apache/hadoop/hdds/scm/storage/TestContainerCommandsEC.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/storage/TestContainerCommandsEC.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/storage/TestContainerCommandsEC.java
index 1b7eb837cf..bf40a600e2 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/storage/TestContainerCommandsEC.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/storage/TestContainerCommandsEC.java
@@ -70,6 +70,7 @@ import
org.apache.hadoop.ozone.common.statemachine.InvalidStateTransitionExcepti
import org.apache.hadoop.ozone.common.utils.BufferUtils;
import org.apache.hadoop.ozone.container.ContainerTestHelper;
import
org.apache.hadoop.ozone.container.common.statemachine.DatanodeConfiguration;
+import org.apache.hadoop.ozone.container.common.statemachine.StateContext;
import
org.apache.hadoop.ozone.container.ec.reconstruction.ECContainerOperationClient;
import
org.apache.hadoop.ozone.container.ec.reconstruction.ECReconstructionCoordinator;
import
org.apache.hadoop.ozone.container.ec.reconstruction.ECReconstructionMetrics;
@@ -170,6 +171,7 @@ public class TestContainerCommandsEC {
@BeforeAll
public static void init() throws Exception {
config = new OzoneConfiguration();
+ config.setBoolean(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY, true);
config.setInt(ScmConfigKeys.OZONE_SCM_PIPELINE_OWNER_CONTAINER_COUNT, 1);
config.setTimeDuration(ScmConfigKeys.OZONE_SCM_STALENODE_INTERVAL, 3,
TimeUnit.SECONDS);
config.setBoolean(OzoneConfigKeys.OZONE_ACL_ENABLED, true);
@@ -320,8 +322,10 @@ public class TestContainerCommandsEC {
.setTxID(1L)
.setCount(10)
.build()));
- dn2Service.getDatanodeStateMachine().getContext()
- .addCommand(deleteBlocksCommand);
+ StateContext context = dn2Service.getDatanodeStateMachine().getContext();
+ deleteBlocksCommand.setTerm(context.getTermOfLeaderSCM().isPresent() ?
+ context.getTermOfLeaderSCM().getAsLong() : 0);
+ context.addCommand(deleteBlocksCommand);
try (XceiverClientGrpc client = new XceiverClientGrpc(
createSingleNodePipeline(orphanPipeline, dn2, 1), cluster.getConf())) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]