tibrewalpratik17 commented on code in PR #12459:
URL: https://github.com/apache/pinot/pull/12459#discussion_r1535292589
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/generator/BaseTaskGenerator.java:
##########
@@ -120,4 +123,23 @@ public List<PinotTaskConfig> generateTasks(TableConfig
tableConfig, Map<String,
throws Exception {
throw new UnknownTaskTypeException("Adhoc task generation is not supported
for task type - " + this.getTaskType());
}
+
+ @Override
+ public void generateTasks(List<TableConfig> tableConfigs,
List<PinotTaskConfig> pinotTaskConfigs)
+ throws Exception {
+ pinotTaskConfigs.addAll(generateTasks(tableConfigs));
+ }
+
+ @Override
+ public String getMinionInstanceTag(TableConfig tableConfig) {
+ TableTaskConfig tableTaskConfig = tableConfig.getTaskConfig();
+ if (tableTaskConfig != null) {
+ Map<String, String> configs =
tableTaskConfig.getConfigsForTaskType(getTaskType());
+ if (!configs.isEmpty()) {
+ return
configs.getOrDefault(PinotTaskManager.MINION_INSTANCE_TAG_CONFIG,
Review Comment:
Actually we do in PinotHelixResourceManager class -
https://github.com/apache/pinot/blob/af0e5b82baf196f1bcea40d9737e3d7926cf9958/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java#L1781-L1785
But I think we should refactor to have it in the TableConfigUtils class.
Tracking it here: #12698
--
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]