-
Jul 6th, 2012, 04:30 AM
#1
Batch strategy - newbie question
Hi All,
As mentioned I am a newbie to Spring Batch. I have the below scenario on my hands.
1) User gives an Excel sheet with a max of 5000 Account nos and these account information are saved in the database.
2) Each loan can have 2000 images.
3) Now, I have to read all account numbers from the database, for each account get all the image locations (in SAN) from the database and copy the images onto a predefined location.
Now my question is, What should be a job and what should be a step.
Should I consider copying all images of an account number to be a job and copying each image as a step (5000 jobs, each having 2000 steps)?
Or should I consider an image copying as job and then have copying the image as one step (5000 * 2000 jobs, each with 1 step)?
Eagerly waiting for your solution. Thanks in advance.
Last edited by deepak.mohanakumar; Jul 6th, 2012 at 04:43 AM.
-
Jul 6th, 2012, 05:32 AM
#2
Neither. The whole thing is the job, and I guess it would be a single step...
The job is read number from excel, find image locations, copy images. Would be a ItemReader which processes the excel stuff, ItemProcessor which could get the image locations, and a Writer which does the copying. Or the Writer can do both (get locations and copy).
-
Jul 8th, 2012, 12:55 AM
#3
Thanks a ton Marten, for your reply.
That makes sense. I will progress with this approach. I guess I will hang around here for the great help and suggestions from experts like you.
Last edited by deepak.mohanakumar; Jul 8th, 2012 at 01:50 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules