Example #1
0
 @Override
 public void fail(Object msgId) {
   LOG.trace("Fail received for msg id {} on spout {}", msgId, spoutId);
   super.fail(msgId);
   if (ackEnabled) {
     HdfsUtils.Pair<MessageId, List<Object>> item =
         HdfsUtils.Pair.of(msgId, inflight.remove(msgId));
     retryList.add(item);
   }
 }
Example #2
0
 @Override
 public void ack(Object msgId) {
   LOG.trace("Ack received for msg {} on spout {}", msgId, spoutId);
   if (!ackEnabled) {
     return;
   }
   MessageId id = (MessageId) msgId;
   inflight.remove(id);
   ++acksSinceLastCommit;
   tracker.recordAckedOffset(id.offset);
   commitProgress(tracker.getCommitPosition());
   if (fileReadCompletely && inflight.isEmpty()) {
     markFileAsDone(reader.getFilePath());
     reader = null;
   }
   super.ack(msgId);
 }