Updated to call PartitionCollector regardless of if the partition completes successfully
This commit is contained in:
@@ -64,5 +64,12 @@ public class PartitionCollectorAdapter implements ChunkListener {
|
||||
|
||||
@Override
|
||||
public void afterChunkError(ChunkContext context) {
|
||||
try {
|
||||
synchronized (partitionQueue) {
|
||||
partitionQueue.add(collector.collectPartitionData());
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
throw new BatchRuntimeException("An error occured while collecting data from the PartionCollector", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class PartitionCollectorAdapterTests {
|
||||
});
|
||||
|
||||
adapter.afterChunk(null);
|
||||
adapter.afterChunk(null);
|
||||
adapter.afterChunkError(null);
|
||||
adapter.afterChunk(null);
|
||||
|
||||
assertEquals(3, dataQueue.size());
|
||||
|
||||
Reference in New Issue
Block a user