【发布时间】:2015-08-27 06:06:11
【问题描述】:
我有一个批处理作业,它使用 AllRowsReader 在 Cassandra 中读取大约 3300 万行,如 in the Astyanax wiki 所述:
new AllRowsReader.Builder<>(getKeyspace(), columnFamily)
.withPageSize(100)
.withIncludeEmptyRows(false)
.withConcurrencyLevel(1)
.forEachRow(
row -> {
try {
return processRow(row);
} catch (Exception e) {
LOG.error("Error while processing row!", e);
return false;
}
}
)
.build()
.call();
如果某种错误停止了批处理作业,我希望能够从它停止的行继续读取,这样我就不必再次从第一行开始读取。有没有快速简单的方法来做到这一点?
或者AllRowsReader 不适合这种任务?
【问题讨论】: