Hi,
I am a newbie and got to know of Terracotta through Spring batch documentation. My knowledge is limited to first few chapters of Terracotta book.
Have a question on how Terracotta can be used in the Partitioning of Batch Process. (http://static.springsource.org/spring-batch/reference/html-single/index.html#partitioning)
If StepExecutionSplitter is responsible for splitting into blocks of work and PartionHandler is responsible for forking, which of these two should Terracotta be informed of?
1. Assuming a grid size of 2, If it is Partition Handler, will each Terr-Client work on its own Partition (that was split by the StepExecutionSplitter)?
2. My understanding so far is that terracotta would take care of this transparently if you specify the object & step. If so, why would I need Spring's Partitioning Support?
Hope my question is clear. Appreciate any suggestions/directions.
The Batch Step is given below:
Code:
<bean name="dscall:master" class="org.springframework.batch.core.partition.support.PartitionStep" >
<property name="jobRepository" ref="jobRepository" />
<property name="stepExecutionSplitter">
<bean class="org.springframework.batch.core.partition.support.SimpleStepExecutionSplitter">
<constructor-arg ref="jobRepository" />
<constructor-arg ref="ds-call" />
<constructor-arg>
<bean class="com.pcg.batch.partition.support.ListPartitioner">
<property name="cache" ref="ehcache" />
</bean>
</constructor-arg>
</bean>
</property>
<property name="partitionHandler">
<bean class="org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler">
<property name="gridSize" value="4"/>
<property name="taskExecutor">
<bean class="org.springframework.core.task.SimpleAsyncTaskExecutor" >
<property name="concurrencyLimit" value="-1"/>
</bean>
</property>
<property name="step" ref="ds-call" />
</bean>
</property>
</bean>
<batch:step id="ds-call">
<batch:tasklet>
<batch:chunk reader="policyReader" writer="dsWriter" commit-interval="5" task-executor="partitionTaskExecutor" throttle-limit="5"/>
</batch:tasklet>
</batch:step>