Jackie-Jiang commented on code in PR #9540:
URL: https://github.com/apache/pinot/pull/9540#discussion_r989355875


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java:
##########
@@ -444,6 +444,24 @@ public synchronized List<PinotTaskConfig> 
getTaskConfigs(String taskName) {
     return taskConfigs;
   }
 
+  /**
+   * Get the task runtime config for the given task name. A task can have 
multiple subtasks, whose configs can be
+   * retrieved via the getSubtaskConfigs() method instead.
+   *
+   * @param taskName Task name
+   * @return Configs for the task returned as a Map.
+   */
+  public synchronized Map<String, String> getTaskRuntimeConfig(String 
taskName) {
+    JobConfig jobConfig = _taskDriver.getJobConfig(getHelixJobName(taskName));
+    jobConfig.getNumConcurrentTasksPerInstance();

Review Comment:
   Redundant?



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java:
##########
@@ -444,6 +444,24 @@ public synchronized List<PinotTaskConfig> 
getTaskConfigs(String taskName) {
     return taskConfigs;
   }
 
+  /**
+   * Get the task runtime config for the given task name. A task can have 
multiple subtasks, whose configs can be
+   * retrieved via the getSubtaskConfigs() method instead.
+   *
+   * @param taskName Task name
+   * @return Configs for the task returned as a Map.
+   */
+  public synchronized Map<String, String> getTaskRuntimeConfig(String 
taskName) {
+    JobConfig jobConfig = _taskDriver.getJobConfig(getHelixJobName(taskName));
+    jobConfig.getNumConcurrentTasksPerInstance();
+    HashMap<String, String> configs = new HashMap<>();
+    configs.put("ConcurrentTasksPerWorker", 
String.valueOf(jobConfig.getNumConcurrentTasksPerInstance()));
+    configs.put("TaskTimeoutInMs", 
String.valueOf(jobConfig.getTimeoutPerTask()));
+    configs.put("TaskExpireTimeInMs", String.valueOf(jobConfig.getExpiry()));

Review Comment:
   (minor) We usually not put `In`
   ```suggestion
       configs.put("TaskTimeoutMs", 
String.valueOf(jobConfig.getTimeoutPerTask()));
       configs.put("TaskExpireTimeMs", String.valueOf(jobConfig.getExpiry()));
   ```



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