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

  • Partitioner Output execution order

    I am using a customized partitioner extending 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"/>
    <bean id="iterator" class="com.springBatch.partition.FeedsPartitioner" scope="step">
    <constructor-arg name="dataFile" value="#{jobExecutionContext['result']}"/>
    <constructor-arg name="keyInContext" value="dataFeed"/>
    <bean id="partitionTaskExecutor" class="org.springframework.batch.admin.util.Thrott ledTaskExecutor" >
    <property name="taskExecutor" ref="poolTaskExecutor"/>
    <property name="throttleLimit" value="1"/>
    <step id="importer" xmlns="">
    <tasklet task-executor="poolTaskExecutor" throttle-limit="10" allow-start-if-complete="true" >
    <chunk reader="itemReader" processor="processor" writer="itemWriter"/>

    Any Help really appreciated.