Jackie-Jiang commented on a change in pull request #6994:
URL: https://github.com/apache/incubator-pinot/pull/6994#discussion_r641020167



##########
File path: 
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/realtime_to_offline_segments/RealtimeToOfflineSegmentsTaskExecutor.java
##########
@@ -197,7 +197,7 @@ public void preProcess(PinotTaskConfig pinotTaskConfig) {
     Preconditions.checkState(inputSegmentsDir.mkdirs(), "Failed to create 
input directory: %s for task: %s",
         inputSegmentsDir.getAbsolutePath(), taskType);
     for (File indexDir : originalIndexDirs) {
-      FileUtils.copyDirectoryToDirectory(indexDir, inputSegmentsDir);
+      FileUtils.moveDirectoryToDirectory(indexDir, inputSegmentsDir, false);

Review comment:
       Ideally we should not move the index directories because the caller 
might still need them. We can directly read from them instead of copying them 
to another dir.
   The current code should work because the parent class won't access the 
original index directories, but please at least add a TODO to describe the side 
effect




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to