zhangyue19921010 commented on code in PR #13496:
URL: https://github.com/apache/hudi/pull/13496#discussion_r2175013003


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/IOUtils.java:
##########
@@ -51,7 +51,12 @@ public static long 
getMaxMemoryAllowedForMerge(TaskContextSupplier context, Stri
       double memoryFraction = Double.parseDouble(memoryFractionOpt.get());
       double maxMemoryFractionForMerge = Double.parseDouble(maxMemoryFraction);
       long executorCores = Long.parseLong(totalCoresOpt.get());
-      double userAvailableMemory = executorMemoryInBytes * (1 - 
memoryFraction) / executorCores;
+      Option<String> singleTaskCoresOpt = 
context.getProperty(EngineProperty.SINGLE_TASK_CORES);
+      long executorTaskNum = executorCores;
+      if (singleTaskCoresOpt.isPresent()) {
+        executorTaskNum = executorCores / 
Long.parseLong(singleTaskCoresOpt.get());

Review Comment:
   Yes, when set  spark.task.cpus=N, Spark will use N cores for a single task



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

Reply via email to