Ejemplo n.º 1
0
 @Override
 public void shutdown() {
   producer.complete();
   try {
     boolean isDone = countDownLatch.await(5, TimeUnit.MINUTES);
     if (!isDone) {
       LOG.warn("Pipeline is still in active state: {} after 5 minutes");
     } else {
       LOG.info("Destroy() on stages is complete");
     }
   } catch (InterruptedException e) {
     LOG.warn("Thread interrupted while waiting on receving the done flag" + e, e);
   }
 }
Ejemplo n.º 2
0
 @Override
 public boolean inErrorState() {
   return producer.inErrorState() || consumer.inErrorState();
 }
Ejemplo n.º 3
0
 @Override
 public void destroy() {
   producer.complete();
   super.destroy();
 }
Ejemplo n.º 4
0
 @Override
 public void put(List<Map.Entry> batch) throws InterruptedException {
   producer.put(new OffsetAndResult<>(recordsProduced, batch));
   recordsProduced += batch.size();
 }