ItemStream.update 관련
297
작성한 질문수 5
@Override
protected void doExecute(StepExecution stepExecution) throws Exception {
stepExecution.getExecutionContext().put(TASKLET_TYPE_KEY, tasklet.getClass().getName());
stepExecution.getExecutionContext().put(STEP_TYPE_KEY, this.getClass().getName());
stream.update(stepExecution.getExecutionContext());
getJobRepository().updateExecutionContext(stepExecution);
// Shared semaphore per step execution, so other step executions can run
// in parallel without needing the lock
final Semaphore semaphore = createSemaphore();
답변 1
0
네
강의를 보시면 ItemReader 와 ItemWriter 가 chunkSize 만큼의 데이터 처리를 한 후 ItemStream.update() 가 실행된다고 설명하고 있습니다.
즉 ItemStream.update() 가 chunkSize 만큼 반복된다는 것이 아니라 chunkSize 단위로 실행된다고 보시면 됩니다.
예를 들어 chunkSize 가 10 이라고 한다면 ItemReader 가 10개의 데이터를 읽은 후 ItemStream.update() 가 발생하고 ItemWriter 가 10 개의 데이터가 담은 list 를 커밋한 후 ItemStream.update() 가 실행된다는 의미입니다.
스프링 배치 버전 질문
0
153
1
소스코드가 어디에 있나요?
0
140
2
트랜잭션 예외
0
111
1
질문이 있습니다.
0
154
2
ChunkListener 에서 beforeChunk 의 실행 시점 관련 질문
0
159
2
여러 JOB 설정하는법
0
160
2
강의 자료 다른 방법 있을까요?
0
171
1
JobExecution과 JobExecutionContext와의 관계
0
209
2
특정 job만 실행
1
280
1
Batch 성능 질문
0
165
1
ItemReaderAdapter 종료
0
92
1
[ 강좌 Git 브랜치 문의 ] 섹션 9 > JdbcCursorItemReader, JpaCursorItemReader
0
209
2
Spring Batch 배포 질문
0
265
2
spring batch 버전
0
250
2
retry count 관련 질문
0
197
2
StepExecutionListener 의 afterStep 에서 return ExitStatus.FAILED 에 의한 동작에 의문이 갑니다.
0
362
2
jdbc, jpa 커서방식 조회 방식 차이 질문 (강사님께 답변 받고 싶습니다)
0
252
2
Multithread step과 AsyncItemProcessor
0
219
2
job 재실행
0
270
2
bean 생명주기 문제 도와주세요(@Scope("step"), @Autowired)
0
199
1
Multi-threaded-step과 Partitioning 차이 확인
0
195
2
jdbcCursorReader, jdbcPagingReader 질문
0
154
1
step muti-thread 질문
0
119
1
itemSteam open update close 질문
0
127
1





