protected void parsePartitionPlan(Element element, ParserContext parserContext, String stepName, MutablePropertyValues properties) { Element planElement = DomUtils.getChildElementByTagName(element, PLAN_ELEMENT); if(planElement != null) { String partitions = planElement.getAttribute(PARTITIONS_ATTRIBUTE); String threads = planElement.getAttribute(THREADS_ATTRIBUTE); if(!StringUtils.hasText(threads)) { threads = partitions; } List<Element> partitionProperties = DomUtils.getChildElementsByTagName(planElement, PROPERTIES_ELEMENT); if(partitionProperties != null) { for (Element partition : partitionProperties) { String partitionStepName = stepName + ":partition" + partition.getAttribute("partition"); new PropertyParser(partitionStepName, parserContext, BatchArtifactType.STEP, partitionStepName).parseProperty(partition); } } properties.add(THREADS_PROPERTY, threads); properties.add(PARTITIONS_PROPERTY, partitions); } } }
protected void parsePartitionPlan(Element element, ParserContext parserContext, String stepName, MutablePropertyValues properties) { Element planElement = DomUtils.getChildElementByTagName(element, PLAN_ELEMENT); if(planElement != null) { String partitions = planElement.getAttribute(PARTITIONS_ATTRIBUTE); String threads = planElement.getAttribute(THREADS_ATTRIBUTE); if(!StringUtils.hasText(threads)) { threads = partitions; } List<Element> partitionProperties = DomUtils.getChildElementsByTagName(planElement, PROPERTIES_ELEMENT); if(partitionProperties != null) { for (Element partition : partitionProperties) { String partitionStepName = stepName + ":partition" + partition.getAttribute("partition"); new PropertyParser(partitionStepName, parserContext, BatchArtifactType.STEP, partitionStepName).parseProperty(partition); } } properties.add(THREADS_PROPERTY, threads); properties.add(PARTITIONS_PROPERTY, partitions); } } }
protected void parsePartitionPlan(Element element, ParserContext parserContext, String stepName, MutablePropertyValues properties) { Element planElement = DomUtils.getChildElementByTagName(element, PLAN_ELEMENT); if(planElement != null) { String partitions = planElement.getAttribute(PARTITIONS_ATTRIBUTE); String threads = planElement.getAttribute(THREADS_ATTRIBUTE); if(!StringUtils.hasText(threads)) { threads = partitions; } List<Element> partitionProperties = DomUtils.getChildElementsByTagName(planElement, PROPERTIES_ELEMENT); if(partitionProperties != null) { for (Element partition : partitionProperties) { String partitionStepName = stepName + ":partition" + partition.getAttribute("partition"); new PropertyParser(partitionStepName, parserContext, BatchArtifactType.STEP, partitionStepName).parseProperty(partition); } } properties.add(THREADS_PROPERTY, threads); properties.add(PARTITIONS_PROPERTY, partitions); } } }
protected void parsePartitionPlan(Element element, ParserContext parserContext, String stepName, MutablePropertyValues properties) { Element planElement = DomUtils.getChildElementByTagName(element, PLAN_ELEMENT); if(planElement != null) { String partitions = planElement.getAttribute(PARTITIONS_ATTRIBUTE); String threads = planElement.getAttribute(THREADS_ATTRIBUTE); if(!StringUtils.hasText(threads)) { threads = partitions; } List<Element> partitionProperties = DomUtils.getChildElementsByTagName(planElement, PROPERTIES_ELEMENT); if(partitionProperties != null) { for (Element partition : partitionProperties) { String partitionStepName = stepName + ":partition" + partition.getAttribute("partition"); new PropertyParser(partitionStepName, parserContext, BatchArtifactType.STEP, partitionStepName).parseProperty(partition); } } properties.add(THREADS_PROPERTY, threads); properties.add(PARTITIONS_PROPERTY, partitions); } } }