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 ed85c7e578 HDDS-7080. EC: Offline reconstruction needs better logging
(#4719)
ed85c7e578 is described below
commit ed85c7e57899f28054343ea0664b8349d20bbc25
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Wed May 17 07:45:34 2023 +0200
HDDS-7080. EC: Offline reconstruction needs better logging (#4719)
---
.../ec/reconstruction/ECReconstructionCoordinator.java | 5 ++++-
.../ec/reconstruction/ECReconstructionCoordinatorTask.java | 12 +++++-------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinator.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinator.java
index a7e5bfb92d..6bd0a4de96 100644
---
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinator.java
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinator.java
@@ -154,7 +154,9 @@ public class ECReconstructionCoordinator implements
Closeable {
for (Map.Entry<Integer, DatanodeDetails> indexDnPair : targetNodeMap
.entrySet()) {
DatanodeDetails dn = indexDnPair.getValue();
- Integer index = indexDnPair.getKey();
+ int index = indexDnPair.getKey();
+ LOG.debug("Creating container {} on datanode {} for index {}",
+ containerID, dn, index);
containerOperationClient
.createRecoveringContainer(containerID, dn, repConfig,
containerToken, index);
@@ -172,6 +174,7 @@ public class ECReconstructionCoordinator implements
Closeable {
// 3. Close containers
for (DatanodeDetails dn: recoveringContainersCreatedDNs) {
+ LOG.debug("Closing container {} on datanode {}", containerID, dn);
containerOperationClient
.closeContainer(containerID, dn, repConfig, containerToken);
}
diff --git
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinatorTask.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinatorTask.java
index c24e060580..6d32f3a3f3 100644
---
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinatorTask.java
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinatorTask.java
@@ -60,12 +60,10 @@ public class ECReconstructionCoordinatorTask
// 4. Write the recovered chunks to given targets/write locally to
// respective container. HDDS-6582
// 5. Close/finalize the recovered containers.
- long containerID = this.reconstructionCommandInfo.getContainerID();
long start = Time.monotonicNow();
- if (LOG.isDebugEnabled()) {
- LOG.debug("Starting the EC reconstruction of the container {}",
- containerID);
- }
+
+ LOG.info("{}", this);
+
try {
reconstructionCoordinator.reconstructECContainerGroup(
reconstructionCommandInfo.getContainerID(),
@@ -73,12 +71,12 @@ public class ECReconstructionCoordinatorTask
reconstructionCommandInfo.getSourceNodeMap(),
reconstructionCommandInfo.getTargetNodeMap());
long elapsed = Time.monotonicNow() - start;
- LOG.info("Completed {} in {} ms", reconstructionCommandInfo, elapsed);
setStatus(Status.DONE);
+ LOG.info("{} in {} ms", this, elapsed);
} catch (Exception e) {
long elapsed = Time.monotonicNow() - start;
- LOG.warn("Failed {} after {} ms", reconstructionCommandInfo, elapsed, e);
setStatus(Status.FAILED);
+ LOG.warn("{} after {} ms", this, elapsed, e);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]