My JSR352 batch job needs to read from a database, and then depending on the result flows to one of two pathways, each of which involves some more if/else scenarios. I wonder what the pros and cons between writing a single step with a large batchlet and several steps consisting of smaller batchlets would be. This job does not involves chunk steps with chunk size larger than 1, as it needs to persists the read result immediately in case there is any before proceeding to other logic. The job will be run using Control-M, I wonder if using multiple smaller steps provides more control points.
Design of JSR352 batch job: Is several steps a better design than one large batchlet?
220 Views Asked by Treefish Zhang At
1
There are 1 best solutions below
Related Questions in CONTROL-M
- Control-M : setting job status ok after specified time
- Powershell PSEXEC not working via Control-M
- Control-M cyclic job keeps running even after failure
- get job/workflow status out of Control M?
- How can I order a job in Control-M using a message queue?
- Control-M Swagger UI API: Is there any API to fetch the history of a job?
- Datastage: How to keep continuous mode job running after a unexpected termination
- creating pivot tables in excel via openxml
- Control-M overriding command script
- What is the difference between an CYC and ECJ Task type in Control-M?
- Control-m scheduling job for 2 options
- Control-m scheduling montly run
- Update non-Periodic Calendar dates in control-m using excel
- Control-M add condition between a monthly and a daily job
- Time in 12-hour format in Control M
Related Questions in JSR352
- JSR 352 Partitioned Chunk Processing
- Is Java Batch (JSR 352) part of the SE JDK ? (BatchRuntime returns NULL for Joboperator)
- How to run Java Batch (JSR352) in java SE environment?
- Writer behavior when using Partitions in JSR352 Java Batch processing
- JSR 352 - Java batch - Cannot inject service bean or DAO in listener artifacts
- Spring boot - jsr352 batch implementation - Beans not getting reference in jobxml
- jsr 352 batch with retryable and skippable exception may processes items many times
- How to get configured retryable/skippable exceptions in jsr352
- configuring dev and prod datasource in liberty dynamically to load based on the environment
- Scope conflicts until batch job finished?
- Job-level callback when execution is stopped via JobOperator
- JSR batch - constructor injection using @BatchProperty
- JSR352 How to prevent same job to run twice?
- How to send emails from a Java EE Batch Job
- Authorization issues with batch OSGi app in Glassfish - "The current user is not authorized to perform this operation"
Related Questions in JAVA-BATCH
- Spring batch in Websphere 8.x
- Writer behavior when using Partitions in JSR352 Java Batch processing
- Job-level callback when execution is stopped via JobOperator
- Authorization issues with batch OSGi app in Glassfish - "The current user is not authorized to perform this operation"
- Is it possible to process a filestream while uploading with JSF and Java EE Batch?
- How to update all emails at once?
- IBM JSR 352 joblogs empty
- How to retrieve decision id of IBM JSR 352 JSL
- Design of JSR352 batch job: Is several steps a better design than one large batchlet?
- How to authorize a Java Batch job so it can run from a startup bean in WebSphere Liberty?
- Java Batch Step with partition returns wrong batchStatus and exitStatus
- Are batchlets the correct way of implementing ETL steps in JavaEE Batch?
- JSR352 decide next step based on return parameter from Decider
- Batch job definition: How to run a dynamically-calculated number of partitions?
- JSR352 - Error while updating VSAM file using ZFile.update()
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
From that description, I'd suggest these
Benefits of more, fine-grained steps
1. Restart
After a job failure, the default behavior on restart is to begin executing at the step where the previous job execution failed. So breaking the job up into more steps allows you to avoid writing the logic to resume where you left off and avoid re-processing, and may save execution time in the process.
2. Reuse
By encapsulating a discrete function as its own batchlet, you can potentially compose other steps in other jobs (or even later in this job) implemented with this same batchlet.
3. Extract logic into XML
By moving the transition logic into the transition elements, and extracting the conditional flow (e.g.
<next on="RC1" to="step3"/>, etc.) into the job definition XML (JSL), you can introduce changes at a standard control point, without having to go into the Java source and find the right place.Final Thoughts
You'll have to decide if those benefits are worth it for your case.
One more thought
I wouldn't automatically rule out the chunk step just because you are using a 1-item chunk, if you can still find benefits from the checkpointing or even possibly the skip/retry. (But that's probably a separate question.)