@Override public void afterChunk(ChunkContext context) { try { if(context.isComplete()) { lock.lock(); Serializable collectPartitionData = collector.collectPartitionData(); if(collectPartitionData != null) { partitionQueue.add(collectPartitionData); } } } catch (Throwable e) { throw new BatchRuntimeException("An error occurred while collecting data from the PartitionCollector", e); } finally { if(lock.isHeldByCurrentThread()) { lock.unlock(); } } }
@Override public void afterChunkError(ChunkContext context) { try { lock.lock(); if(context.isComplete()) { Serializable collectPartitionData = collector.collectPartitionData(); if(collectPartitionData != null) { partitionQueue.add(collectPartitionData); } } } catch (Throwable e) { throw new BatchRuntimeException("An error occurred while collecting data from the PartitionCollector", e); } finally { if(lock.isHeldByCurrentThread()) { lock.unlock(); } } } }
if (!chunkContext.isComplete()) { attributeQueue.add(chunkContext);
@Test public void testIsComplete() { assertFalse(context.isComplete()); context.setComplete(); assertTrue(context.isComplete()); }
@Override public void afterChunk(ChunkContext context) { try { if(context.isComplete()) { lock.lock(); Serializable collectPartitionData = collector.collectPartitionData(); if(collectPartitionData != null) { partitionQueue.add(collectPartitionData); } } } catch (Throwable e) { throw new BatchRuntimeException("An error occurred while collecting data from the PartitionCollector", e); } finally { if(lock.isHeldByCurrentThread()) { lock.unlock(); } } }
@Override public void afterChunk(ChunkContext context) { try { if(context.isComplete()) { lock.lock(); Serializable collectPartitionData = collector.collectPartitionData(); if(collectPartitionData != null) { partitionQueue.add(collectPartitionData); } } } catch (Throwable e) { throw new BatchRuntimeException("An error occured while collecting data from the PartionCollector", e); } finally { if(lock.isHeldByCurrentThread()) { lock.unlock(); } } }
@Override public void afterChunk(ChunkContext context) { try { if(context.isComplete()) { lock.lock(); Serializable collectPartitionData = collector.collectPartitionData(); if(collectPartitionData != null) { partitionQueue.add(collectPartitionData); } } } catch (Throwable e) { throw new BatchRuntimeException("An error occurred while collecting data from the PartitionCollector", e); } finally { if(lock.isHeldByCurrentThread()) { lock.unlock(); } } }
@Override public void afterChunkError(ChunkContext context) { try { lock.lock(); if(context.isComplete()) { Serializable collectPartitionData = collector.collectPartitionData(); if(collectPartitionData != null) { partitionQueue.add(collectPartitionData); } } } catch (Throwable e) { throw new BatchRuntimeException("An error occurred while collecting data from the PartitionCollector", e); } finally { if(lock.isHeldByCurrentThread()) { lock.unlock(); } } } }
@Override public void afterChunkError(ChunkContext context) { try { lock.lock(); if(context.isComplete()) { Serializable collectPartitionData = collector.collectPartitionData(); if(collectPartitionData != null) { partitionQueue.add(collectPartitionData); } } } catch (Throwable e) { throw new BatchRuntimeException("An error occured while collecting data from the PartionCollector", e); } finally { if(lock.isHeldByCurrentThread()) { lock.unlock(); } } } }
@Override public void afterChunkError(ChunkContext context) { try { lock.lock(); if(context.isComplete()) { Serializable collectPartitionData = collector.collectPartitionData(); if(collectPartitionData != null) { partitionQueue.add(collectPartitionData); } } } catch (Throwable e) { throw new BatchRuntimeException("An error occurred while collecting data from the PartitionCollector", e); } finally { if(lock.isHeldByCurrentThread()) { lock.unlock(); } } } }
if (!chunkContext.isComplete()) { attributeQueue.add(chunkContext);
if (!chunkContext.isComplete()) { attributeQueue.add(chunkContext);
if (!chunkContext.isComplete()) { attributeQueue.add(chunkContext);
if (!chunkContext.isComplete()) { attributeQueue.add(chunkContext);