Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ public void reconstructECContainerGroup(long containerID,
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);
Expand All @@ -172,6 +174,7 @@ public void reconstructECContainerGroup(long containerID,

// 3. Close containers
for (DatanodeDetails dn: recoveringContainersCreatedDNs) {
LOG.debug("Closing container {} on datanode {}", containerID, dn);
containerOperationClient
.closeContainer(containerID, dn, repConfig, containerToken);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,23 @@ public void runTask() {
// 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(),
reconstructionCommandInfo.getEcReplicationConfig(),
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);
}
}

Expand Down