ChenSammi commented on code in PR #3648:
URL: https://github.com/apache/ozone/pull/3648#discussion_r946695928


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/SimpleContainerDownloader.java:
##########
@@ -50,24 +58,33 @@ public class SimpleContainerDownloader implements 
ContainerDownloader {
   private static final Logger LOG =
       LoggerFactory.getLogger(SimpleContainerDownloader.class);
 
-  private final Path workingDirectory;
+  public static final String CONTAINER_COPY_DIR = "container-copy";
+
+  private ConfigurationSource conf;
   private final SecurityConfig securityConfig;
   private final CertificateClient certClient;
+  private final VolumeSet volumeSet;
+  private VolumeChoosingPolicy volumeChoosingPolicy = null;
+  private long containerSize;
 
   public SimpleContainerDownloader(
-      ConfigurationSource conf, CertificateClient certClient) {
+      ConfigurationSource conf, CertificateClient certClient,
+      VolumeSet volumeSet) {
 
-    String workDirString =
-        conf.get(OzoneConfigKeys.OZONE_CONTAINER_COPY_WORKDIR);
-
-    if (workDirString == null) {
-      workingDirectory = Paths.get(System.getProperty("java.io.tmpdir"))
-          .resolve("container-copy");
-    } else {
-      workingDirectory = Paths.get(workDirString);
-    }
+    this.conf = conf;
     securityConfig = new SecurityConfig(conf);
     this.certClient = certClient;
+    this.volumeSet = volumeSet;

Review Comment:
   @symious , the new proposed flow should be, 
   1)  choose a volume and download the container tar into the temp directory.
   2)  untar the container into temp directory.
   3)  move the container directory to destination directory and finish the 
container import. 
   
   So not only SimpleContainerDownloader, but also the container import flow 
should be updated. 



-- 
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]

Reply via email to