BATCH-2151: Clean up ChunkMonitor offset on chunk boundries
This commit is contained in:
@@ -140,6 +140,7 @@ public class ChunkMonitor extends ItemStreamSupport {
|
||||
// Only call the underlying update method if we are on a chunk
|
||||
// boundary
|
||||
stream.update(executionContext);
|
||||
executionContext.remove(getExecutionContextKey(OFFSET));
|
||||
}
|
||||
else {
|
||||
executionContext.putInt(getExecutionContextKey(OFFSET), data.offset);
|
||||
|
||||
@@ -128,6 +128,10 @@ public class ChunkMonitorTests {
|
||||
ExecutionContext executionContext = new ExecutionContext();
|
||||
monitor.update(executionContext);
|
||||
assertEquals(0, executionContext.size());
|
||||
|
||||
executionContext.put(ChunkMonitor.class.getName() + ".OFFSET", 3);
|
||||
monitor.update(executionContext);
|
||||
assertEquals(0, executionContext.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user