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?
224 views Asked by Treefish Zhang At
1
There are 1 answers
Related Questions in CONTROL-M
- How to use configuration environment files with ctm.yaml in control-m
- Automate Control-M to run job using Selenium Java
- How to establish a connection between 2 folders in different workspaces in Control-M?
- Control-M Swagger UI API: Is there any API to fetch the history of a job?
- How to reuse control M jobs and workspace for different environments
- Can I add a day to control-m based on the current system time?
- How to trigger a MWAA dag from python script or from control-m job?
- Control M schedule change
- Dynamic Job Definitions using Control M REST API (Version 9.0.19)
- How to trigger a unix job on EC2 instance from AWS Eventbridge?
- If control m is calling a database job what nls_date_format the session use
- powershell - SSIS send mailmessage to multiple recipents
- Sequencing of on do actions
- Is there a way to use on-do actions to remove the In Condition before rerunning a Control-M job in version 9?
- Ctrl-M powershell script not reading SQL correctly
Related Questions in JSR352
- Java BatchProperty possible as List<String>?
- JBeret skippable exception thrown in ItemWriter triggers new chunk within the old transaction
- Liberty Batch function not using database persistence for job repository
- Custom JobRepository in JBeret for Quarkus
- Error using Oracle DB as default job repository in Jakarta batch (JSR352 -Wildfly / jberet)
- Delete data in Java Batch Job (JSR352)
- How to distribute work correctly in JSR-352?
- JSR-352: Save chunk checkpoint after ItemReader reads items
- Wildfly 26.1.3 Domain Batch JBeret WFLYCTL0030: No resource definition is registered for address
- WebSphere Liberty - Batch reader/writer/etc. not showing updated values when job is re-run with different job parameter values
- Java Batch Multithreading
- How to prevent the parallel execution of a Step used in two Jobs in JBeret?
- Revert Database changes on Jakarta EE Batch failure
- How to run spring batch JSR 352
- Job-level callback when execution is stopped via JobOperator
Related Questions in JAVA-BATCH
- Windows Scheduler not writing application logs in to log file
- Error using Oracle DB as default job repository in Jakarta batch (JSR352 -Wildfly / jberet)
- Filtering after Read in Spring Batch
- Returning previous business day instead of currentDate with fastDateFormat
- Spring Batch Stops exactly at 2 hours 10 minutes everytime
- WebSphere Liberty - Batch reader/writer/etc. not showing updated values when job is re-run with different job parameter values
- How to prevent the parallel execution of a Step used in two Jobs in JBeret?
- Job-level callback when execution is stopped via JobOperator
- How to use dynamic values in JSL in a JSR-352 Java Batch application
- Spring Boot Batch Job is not called by Scheduler
- Java Batch job: how to wait for a user decision?
- Stopping a JSR batch application during operation without throwing exception
- JSR352 decide next step based on return parameter from Decider
- JEE Batch Job Specification with many optional Steps
- Batch job definition: How to run a dynamically-calculated number of partitions?
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?
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)
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.)