You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/06/24 00:16:16 UTC

[GitHub] [druid] jihoonson commented on a change in pull request #10046: Fix missing temp dir for native single_dim

jihoonson commented on a change in pull request #10046:
URL: https://github.com/apache/druid/pull/10046#discussion_r444575873



##########
File path: indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/PartialDimensionDistributionTask.java
##########
@@ -200,6 +202,10 @@ public TaskStatus runTask(TaskToolbox toolbox) throws Exception
     Preconditions.checkNotNull(partitionDimension, "partitionDimension required in partitionsSpec");
     boolean isAssumeGrouped = partitionsSpec.isAssumeGrouped();
 
+    final File tmpDir = toolbox.getIndexingTmpDir();
+    // Temporary directory is automatically removed when this IndexTask completes.
+    FileUtils.forceMkdir(tmpDir);

Review comment:
       How about pushing this code into `TaskToolbox.getIndexingTmpDir()`? We can check if the directory exists first and then create one.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org