Announcement Announcement Module
Collapse
No announcement yet.
Partitioner Output execution order Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Partitioner Output execution order

    I am using a customized partitioner extending org.springframework.batch.core.partition.support.P artitioner, in my code. The partition function returns a LinkedHashMap, to ensure that the order remains intact. However, when I iterate over the partitions, I receive them in random orders. I want them in the same order, as added in the Map. How can I do that? Here is the job.xml code snippet:

    <partition step="importer" partitioner="iterator">
    <batch:handler grid-size="1" task-executor="partitionTaskExecutor"/>
    </partition>
    <bean id="iterator" class="com.springBatch.partition.FeedsPartitioner" scope="step">
    <constructor-arg name="dataFile" value="#{jobExecutionContext['result']}"/>
    <constructor-arg name="keyInContext" value="dataFeed"/>
    </bean>
    <bean id="partitionTaskExecutor" class="org.springframework.batch.admin.util.Thrott ledTaskExecutor" >
    <property name="taskExecutor" ref="poolTaskExecutor"/>
    <property name="throttleLimit" value="1"/>
    </bean>
    <step id="importer" xmlns="http://www.springframework.org/schema/batch">
    <tasklet task-executor="poolTaskExecutor" throttle-limit="10" allow-start-if-complete="true" >
    <chunk reader="itemReader" processor="processor" writer="itemWriter"/>
    </tasklet>
    </step>

    Any Help really appreciated.

    Thanks!
Working...
X