Announcement Announcement Module
Collapse
No announcement yet.
Read all rows before processing Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Read all rows before processing

    Is there a way to read all items (other than setting the commit-interval to a high number) before processing? I know this goes against the chunk processing setup but I need to read all rows from a table and then start processing/writing. I would have thought that this should be doable by setting commit-interval=0 but I don't think that works.
    Last edited by javasol; Aug 22nd, 2012, 12:21 PM.

  • #2
    I was able to get it to work using the following:
    Code:
    				chunk-completion-policy="completionPolicy"> 
    			   </chunk>
    			</tasklet>			
    		</step> 
        </job>    
        <bean id="completionPolicy" class="org.springframework.batch.repeat.policy.DefaultResultCompletionPolicy"/>
    The reason I don't like this solution is because it takes a long time. I turned debug on and I see thousands of lines that look like this:

    Code:
    DEBUG [org.springframework.batch.repeat.support.RepeatTemplate] - <Repeat operation about to start at count=465>                                      
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Initializing new StandardEnvironment>                                                     
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Adding [systemProperties] PropertySource with lowest search precedence>                   
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Adding [systemEnvironment] PropertySource with lowest search precedence>                  
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]>
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Initializing new StandardEnvironment>                                                     
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Adding [systemProperties] PropertySource with lowest search precedence>                   
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Adding [systemEnvironment] PropertySource with lowest search precedence>                  
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]>
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Initializing new StandardEnvironment>                                                     
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Adding [systemProperties] PropertySource with lowest search precedence>                   
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Adding [systemEnvironment] PropertySource with lowest search precedence>                  
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]>
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Initializing new StandardEnvironment>                                                     
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Adding [systemProperties] PropertySource with lowest search precedence>                   
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Adding [systemEnvironment] PropertySource with lowest search precedence>                  
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]>
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Initializing new StandardEnvironment>                                                     
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Adding [systemProperties] PropertySource with lowest search precedence>                   
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Adding [systemEnvironment] PropertySource with lowest search precedence>                  
    DEBUG [org.springframework.core.env.StandardEnvironment] - <Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]>

    Comment

    Working...
    X