narendly commented on a change in pull request #1326:
URL: https://github.com/apache/helix/pull/1326#discussion_r483234556
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/stages/ResourceComputationStage.java
##########
@@ -98,6 +101,43 @@ public void process(ClusterEvent event) throws Exception {
}
}
+ // Add TaskFramework resources from workflow and job configs as Task
Framework will no longer
+ // use IdealState
+ if (isTaskCache) {
+ WorkflowControllerDataProvider taskDataCache =
+ event.getAttribute(AttributeName.ControllerDataProvider.name());
+ for (Map.Entry<String, WorkflowConfig> workflowConfigEntry :
taskDataCache
+ .getWorkflowConfigMap().entrySet()) {
+ // always overwrite, because the resource could be created by IS
+ String resourceName = workflowConfigEntry.getKey();
+ WorkflowConfig workflowConfig = workflowConfigEntry.getValue();
+ addResourceConfigToResourceMap(resourceName, workflowConfig,
cache.getClusterConfig(),
+ resourceMap, resourceToRebalance);
+ addPartition(resourceName, resourceName, resourceMap);
+ }
+
+ for (Map.Entry<String, JobConfig> jobConfigEntry :
taskDataCache.getJobConfigMap()
+ .entrySet()) {
+ // always overwrite, because the resource could be created by IS
+ String resourceName = jobConfigEntry.getKey();
+ JobConfig jobConfig = jobConfigEntry.getValue();
+ addResourceConfigToResourceMap(resourceName, jobConfig,
cache.getClusterConfig(),
+ resourceMap, resourceToRebalance);
+ int numPartitions = jobConfig.getTaskConfigMap().size();
+ if (numPartitions == 0 && idealStates != null) {
+ IdealState targetIs = idealStates.get(jobConfig.getTargetResource());
+ if (targetIs == null) {
+ LOG.warn("Target resource does not exist for job " + resourceName);
Review comment:
Probably more helpful if you included the name of the target resource.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]