This is an automated email from the ASF dual-hosted git repository.

karan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 30a91be15a Add log statements for tmpStorageBytes in MSQ (#14449)
30a91be15a is described below

commit 30a91be15a4b728d4a3c6e8ff4fb0d8ae554a1a6
Author: Adarsh Sanjeev <[email protected]>
AuthorDate: Tue Jul 11 11:02:12 2023 +0530

    Add log statements for tmpStorageBytes in MSQ (#14449)
    
    * Add log statements for tmpStorageBytes in MSQ
    
    * Add log
    
    * Update log message
---
 .../java/org/apache/druid/msq/exec/WorkerStorageParameters.java  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerStorageParameters.java
 
b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerStorageParameters.java
index 38d7e28d32..59576ec90b 100644
--- 
a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerStorageParameters.java
+++ 
b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerStorageParameters.java
@@ -23,6 +23,7 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.inject.Injector;
 import org.apache.druid.indexing.common.config.TaskConfig;
+import org.apache.druid.java.util.common.logger.Logger;
 import org.apache.druid.msq.indexing.error.MSQException;
 import org.apache.druid.msq.indexing.error.NotEnoughTemporaryStorageFault;
 
@@ -31,10 +32,10 @@ import java.util.Objects;
 /**
  * Class for determining the amount of temporary disk space to allocate to 
various purposes, given the per-worker limit.
  * Similar to {@link WorkerMemoryParameters}, but for temporary disk space.
- *
+ * <br>
  * Currently only used to allocate disk space for intermediate output from 
super sorter storage, if intermediate super
  * sorter storage is enabled.
- *
+ * <br>
  * If it is enabled, keeps {@link #MINIMUM_BASIC_OPERATIONS_BYTES} for 
miscellaneous operations and
  * configures the super sorter to use {@link 
#SUPER_SORTER_TMP_STORAGE_USABLE_FRACTION} of the remaining space for
  * intermediate files. If this value is less than {@link 
#MINIMUM_SUPER_SORTER_TMP_STORAGE_BYTES},
@@ -42,6 +43,8 @@ import java.util.Objects;
  */
 public class WorkerStorageParameters
 {
+  private static final Logger log = new Logger(WorkerStorageParameters.class);
+
   /**
    * Fraction of temporary worker storage that can be allocated to super 
sorter intermediate files.
    */
@@ -97,6 +100,8 @@ public class WorkerStorageParameters
     Preconditions.checkArgument(tmpStorageBytesPerTask > 0, "Temporary storage 
bytes passed: [%s] should be > 0", tmpStorageBytesPerTask);
     long intermediateSuperSorterStorageMaxLocalBytes = 
computeUsableStorage(tmpStorageBytesPerTask);
 
+    log.info("Intermediate super sorter local storage size: %d bytes", 
intermediateSuperSorterStorageMaxLocalBytes);
+
     if (intermediateSuperSorterStorageMaxLocalBytes < 
MINIMUM_SUPER_SORTER_TMP_STORAGE_BYTES) {
       throw new MSQException(
           new NotEnoughTemporaryStorageFault(


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to