Skip to content

Commit 79a4e97

Browse files
committed
Update chunk size to 4
1 parent 8070bd0 commit 79a4e97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/springframework/batch/MyBatchJobConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ public class MyBatchJobConfiguration {
4949
private static final Logger logger = LoggerFactory.getLogger(MyBatchJobConfiguration.class);
5050

5151
// Restrict the number of rows to read to short the tests
52-
public final static String sqlQuery = "SELECT CODE, REF, TYPE, NATURE, ETAT, REF2 FROM mytable where CODE > 10000 and CODE < 10005";
52+
public final static String sqlQuery = "SELECT CODE, REF, TYPE, NATURE, ETAT, REF2 FROM mytable where CODE > 10000 and CODE < 10020";
5353

5454
private final int chunkSize;
5555
private final String commonFilename;
5656
private final String jsonFilename;
5757
private final FileSystemResource jsonFileResource;
5858

5959
public MyBatchJobConfiguration() {
60-
this.chunkSize = 1;
60+
this.chunkSize = 4;
6161
logger.info("Initializing filenames in synchronized block by thread: {}", Thread.currentThread().getName());
6262
this.commonFilename = "mydata_" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd_HHmmssSSS"));
6363
this.jsonFilename = this.commonFilename + ".json";

0 commit comments

Comments
 (0)