2014-12-06 21 views
0

在我的工作中,我将数据库导出为分区的csv。下一步使用MultiResourceItemReader将这些文件合并到一个文件中。如何确保在进入下一个作业步骤之前完成所有步骤分区

我的问题是,合并步骤开始时,文件似乎不可用。 我得到这个异常的作业失败的所有部分的CSV文件中导出目录可用

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) 

但随后后。 在春季批处理参考中,它实际上列出了第16页上的这种非常体系结构的考虑事项:

此外,体系结构还应考虑分区的整合。关键问题 包括: •在进入下一个工作步骤之前,是否必须完成所有分区?

我已经搜索了文档和网页,以了解如何确保在进入下一个作业步骤之前完成所有步骤分区并且似乎找不到答案的答案。

虽然这一定是一个普遍的考虑因素,但显然我错过了一些很大的东西。

回答

0

默认情况下,只有分区的所有步骤完成后,步骤才会被标记为完成。你确定你下一步正在寻找正确的目录中的文件?

您可以开启日志记录,它应提供有关何时完成步骤和下一步开始的详细信息

相关问题