0

私の仕事では、パーティション化されたcsvへのデータベースエクスポートがあります。次のステップでは、MultiResourceItemReader を使用してこれらのファイルを 1 つのファイルにマージします。

私の問題は、マージ ステップの開始時にファイルが利用できないように見えることです。この例外が発生します

java.lang.IllegalStateException: No resources to read. Set strict=false if this is not an error condition.
    at org.springframework.batch.item.file.MultiResourceItemReader.open(MultiResourceItemReader.java:169)
    at org.springframework.batch.item.support.CompositeItemStream.open(CompositeItemStream.java:96)
    at org.springframework.batch.core.step.item.ChunkMonitor.open(ChunkMonitor.java:114)
    at org.springframework.batch.item.support.CompositeItemStream.open(CompositeItemStream.java:96)
    at org.springframework.batch.core.step.tasklet.TaskletStep.open(TaskletStep.java:310)
    at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195)
    at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
    at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64) 

ただし、ジョブが失敗した後、すべてのパーツ csv ファイルがエクスポート ディレクトリで利用可能になります。春のバッチリファレンスでは、実際にはこの非常にアーキテクチャ上の考慮事項が16ページにリストされています。

また、アーキテクチャは、パーティションの統合を考慮する必要があります。主な質問は次のとおりです。 • 次のジョブ ステップに進む前に、すべてのパーティションを終了する必要がありますか。

ドキュメントと Web を検索して、次のジョブ ステップに進む前にすべてのステップ パーティションが完了していることを確認する方法の答えを探しましたが、答えが見つからないようです。

それは一般的な考慮事項であるに違いありませんが、明らかに何かが欠けています。

4

1 に答える 1