sodonnel commented on code in PR #4887:
URL: https://github.com/apache/ozone/pull/4887#discussion_r1469711504
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java:
##########
@@ -367,7 +393,88 @@ private class DiskBalancerTask implements BackgroundTask {
@Override
public BackgroundTaskResult call() {
- // TODO: Details of handling tasks
+ long containerId = containerData.getContainerID();
+ boolean destVolumeIncreased = false;
+ Path diskBalancerTmpDir = null, diskBalancerDestDir = null;
+ long containerSize = containerData.getBytesUsed();
+ try {
+ diskBalancerTmpDir = destVolume.getTmpPath()
+ .resolve(DISK_BALANCER_DIR).resolve(String.valueOf(containerId));
+
+ // Copy container to new Volume's tmp Dir
+ ozoneContainer.getController().copyContainer(containerData,
Review Comment:
We have a design in progress that will deal with mis-matches between the
containers in terms of deleted blocks, but I feel we should try to avoid
causing such problems if we can. I am not sure how hard that might be with the
current code layout.
Eg if there was a read lock held for the duration of the container move,
then it would allow block reads etc to come through, but would stop block
deletes. However at the moment, I don't think readChunk has any locks involved,
so this would be a lot of difficult changes I think.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]