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 bb5cf11550 HDDS-8642. TestContainerCommandsEC should close
ECReconstructionCoordinator (#4728)
bb5cf11550 is described below
commit bb5cf11550b56421674045be838084765c632c80
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Thu May 18 12:05:57 2023 +0200
HDDS-8642. TestContainerCommandsEC should close ECReconstructionCoordinator
(#4728)
---
.../hadoop/hdds/scm/storage/TestContainerCommandsEC.java | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 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 0f3cdf8d35..0c2fb3887e 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
@@ -341,9 +341,6 @@ public class TestContainerCommandsEC {
}, 500, 30000);
}
- ECReconstructionCoordinator coordinator = new ECReconstructionCoordinator(
- config, certClient, null, ECReconstructionMetrics.create());
-
// Create a reconstruction command to create a new copy of indexes 4 and 5
// which means 1 to 3 must be available. However we know the block
// information is missing for index 2. As all containers in the stripe must
@@ -367,10 +364,15 @@ public class TestContainerCommandsEC {
targetNodeMap.put(EC_DATA + j + 1, targets.get(j));
}
- // Attempt to reconstruct the container.
- coordinator.reconstructECContainerGroup(orphanContainerID,
- (ECReplicationConfig) repConfig,
- sourceNodeMap, targetNodeMap);
+ try (ECReconstructionCoordinator coordinator =
+ new ECReconstructionCoordinator(config, certClient, null,
+ ECReconstructionMetrics.create())) {
+
+ // Attempt to reconstruct the container.
+ coordinator.reconstructECContainerGroup(orphanContainerID,
+ (ECReplicationConfig) repConfig,
+ sourceNodeMap, targetNodeMap);
+ }
// Check the block listing for the recovered containers 4 or 5 and they
// should be present but with no blocks as the only block in the container
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]