Spring batch Multithreaded processing for Single file to Multiple FIle

前端 未结 3 1100
一个人的身影
一个人的身影 2021-01-19 19:38

My problem statement. Read a csv file with 10 million data and store it in db. with as minimal time as possible.

I had implemented it using Simple multi threaded

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-19 20:15

    You can split your input file to many file , the use Partitionner and load small files with threads, but on error , you must restart all job after DB cleaned.

    
        
            
        
        
            
        
        
            
                
            
        
        
            
                
            
        
    
    

    Full example code (on Github).

    Hope this help.

提交回复
热议问题