remove nfljob.xml
This commit is contained in:
@@ -1,174 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
|
||||
<bean
|
||||
class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
|
||||
<property name="jobConfigurationRegistry"
|
||||
ref="jobConfigurationRegistry" />
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="nfljob"
|
||||
class="org.springframework.batch.core.configuration.JobConfiguration">
|
||||
<property name="restartable" value="true" />
|
||||
<property name="startLimit" value="100" />
|
||||
<property name="steps">
|
||||
<list>
|
||||
<bean id="playerload"
|
||||
class="org.springframework.batch.execution.step.simple.SimpleStepConfiguration">
|
||||
<property name="commitInterval" value="100"></property>
|
||||
<property name="startLimit" value="100" />
|
||||
<property name="saveRestartData" value="true" />
|
||||
<property name="allowStartIfComplete" value="false" />
|
||||
<property name="tasklet">
|
||||
<bean
|
||||
class="org.springframework.batch.execution.tasklet.RestartableItemProviderTasklet">
|
||||
<property name="itemProvider">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.item.provider.NflPlayerItemProvider">
|
||||
<property name="inputSource"
|
||||
ref="playerFileInputSource" />
|
||||
<property name="fieldSetMapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.mapping.NflPlayerMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="itemProcessor">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.item.processor.NflPlayerItemProcessor">
|
||||
<property name="nflPlayerDao">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.dao.SqlNflPlayerDao">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="gameLoad"
|
||||
class="org.springframework.batch.execution.step.simple.SimpleStepConfiguration">
|
||||
<property name="commitInterval" value="100" />
|
||||
<property name="startLimit" value="100" />
|
||||
<property name="saveRestartData" value="true" />
|
||||
<property name="tasklet">
|
||||
<bean
|
||||
class="org.springframework.batch.execution.tasklet.RestartableItemProviderTasklet">
|
||||
<property name="itemProvider">
|
||||
<bean
|
||||
class="org.springframework.batch.item.provider.FlatFileItemProvider">
|
||||
<property name="source"
|
||||
ref="gameFileInputSource" />
|
||||
<property name="mapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.mapping.NflGameMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="itemProcessor">
|
||||
<bean
|
||||
class="org.springframework.batch.item.processor.OutputSourceItemProcessor">
|
||||
<property name="outputSource">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.dao.SqlNflGameDao">
|
||||
<property name="dataSource"
|
||||
ref="dataSource" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="playerSummarization"
|
||||
class="org.springframework.batch.execution.step.simple.SimpleStepConfiguration">
|
||||
<property name="commitInterval" value="100" />
|
||||
<property name="startLimit" value="100" />
|
||||
<property name="saveRestartData" value="true" />
|
||||
<property name="tasklet">
|
||||
<bean
|
||||
class="org.springframework.batch.execution.tasklet.RestartableItemProviderTasklet">
|
||||
<property name="itemProvider">
|
||||
<bean
|
||||
class="org.springframework.batch.item.provider.InputSourceItemProvider">
|
||||
<property name="inputSource"
|
||||
ref="playerSummarizationSource" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="itemProcessor">
|
||||
<bean
|
||||
class="org.springframework.batch.item.processor.OutputSourceItemProcessor">
|
||||
<property name="outputSource">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.dao.SqlNflPlayerSummaryDao">
|
||||
<property name="dataSource"
|
||||
ref="dataSource" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="playerFileInputSource"
|
||||
class="org.springframework.batch.io.file.support.DefaultFlatFileInputSource">
|
||||
<property name="resource">
|
||||
<bean
|
||||
class="org.springframework.core.io.ClassPathResource">
|
||||
<constructor-arg value="data/nfljob/input/player.csv" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="tokenizer">
|
||||
<bean
|
||||
class="org.springframework.batch.io.file.support.transform.DelimitedLineTokenizer">
|
||||
<property name="names"
|
||||
value="ID,lastName,firstName,position,birthYear,debutYear" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="gameFileInputSource"
|
||||
class="org.springframework.batch.io.file.support.DefaultFlatFileInputSource">
|
||||
<property name="resource">
|
||||
<bean
|
||||
class="org.springframework.core.io.ClassPathResource">
|
||||
<constructor-arg value="data/nfljob/input/games.csv" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="tokenizer">
|
||||
<bean
|
||||
class="org.springframework.batch.io.file.support.transform.DelimitedLineTokenizer">
|
||||
<property name="names"
|
||||
value="id,year,team,week,opponent,completes,attempts,passingYards,passingTd,interceptions,rushes,rushYards,receptions,receptionYards,totalTd" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="playerSummarizationSource"
|
||||
class="org.springframework.batch.io.sql.SqlCursorInputSource">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="mapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.mapping.NflPlayerSummaryMapper" />
|
||||
</property>
|
||||
<property name="sql">
|
||||
<value>
|
||||
SELECT games.player_id, games.year, SUM(COMPLETES),
|
||||
SUM(ATTEMPTS), SUM(PASSING_YARDS), SUM(PASSING_TD),
|
||||
SUM(INTERCEPTIONS), SUM(RUSHES), SUM(RUSH_YARDS),
|
||||
SUM(RECEPTIONS), SUM(RECEPTIONS_YARDS), SUM(TOTAL_TD)
|
||||
from games, players where players.player_id =
|
||||
games.player_id group by games.player_id, games.year
|
||||
</value>
|
||||
</property>
|
||||
</bean>
|
||||
</beans>
|
||||
Reference in New Issue
Block a user