tibrewalpratik17 commented on code in PR #12459: URL: https://github.com/apache/pinot/pull/12459#discussion_r1517538480
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java: ########## @@ -534,66 +535,88 @@ private synchronized Map<String, String> scheduleTasks(List<String> tableNamesWi * Returns the task name, or {@code null} if no task is scheduled. */ @Nullable - private String scheduleTask(PinotTaskGenerator taskGenerator, List<TableConfig> enabledTableConfigs, + private List<String> scheduleTask(PinotTaskGenerator taskGenerator, List<TableConfig> enabledTableConfigs, boolean isLeader) { LOGGER.info("Trying to schedule task type: {}, isLeader: {}", taskGenerator.getTaskType(), isLeader); - List<PinotTaskConfig> pinotTaskConfigs; - try { - /* TODO taskGenerator may skip generating tasks for some of the tables being passed to it. - In that case, we should not be storing success timestamps for those table. Same with exceptions that should - only be associated with the table for which it was raised and not every eligible table. We can have the - generateTasks() return a list of TaskGeneratorMostRecentRunInfo for each table - */ - pinotTaskConfigs = taskGenerator.generateTasks(enabledTableConfigs); - long successRunTimestamp = System.currentTimeMillis(); - for (TableConfig tableConfig : enabledTableConfigs) { - _taskManagerStatusCache.saveTaskGeneratorInfo(tableConfig.getTableName(), taskGenerator.getTaskType(), + Map<String, List<PinotTaskConfig>> pinotMinionInstanceToTaskConfigs = new HashMap<>(); + String taskType = taskGenerator.getTaskType(); + for (TableConfig tableConfig : enabledTableConfigs) { + String tableName = tableConfig.getTableName(); + try { + String minionInstanceTag = taskGenerator.getMinionInstanceTag(tableConfig); + List<PinotTaskConfig> pinotTaskConfig = taskGenerator.generateTasks(List.of(tableConfig)); Review Comment: Added this method in PinotTaskGenerator and BaseTaskGenerator. -- 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: commits-unsubscr...@pinot.apache.org 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