Examples of KafkaLogEvent


Examples of co.cask.cdap.logging.kafka.KafkaLogEvent

          List<KafkaLogEvent> msgList = messageTable.get(key, loggingContext.getLogPathFragment());
          if (msgList == null) {
            msgList = Lists.newArrayList();
            messageTable.put(key, loggingContext.getLogPathFragment(), msgList);
          }
          msgList.add(new KafkaLogEvent(genericRecord, event, loggingContext,
                                        message.getTopicPartition().getPartition(), message.getNextOffset()));
        }
      } catch (Throwable e) {
        LOG.warn("Exception while processing message with nextOffset {}. Skipping it.", message.getNextOffset(), e);
      }
View Full Code Here

Examples of co.cask.cdap.logging.kafka.KafkaLogEvent

  public void append(List<KafkaLogEvent> events) throws Exception {
    if (events.isEmpty()) {
      return;
    }

    KafkaLogEvent event = events.get(0);
    int partition = event.getPartition();
    Long currentMaxOffset = partitionOffsetMap.get(partition);
    currentMaxOffset = currentMaxOffset == null ? -1 : currentMaxOffset;

    for (KafkaLogEvent e : events) {
      if (e.getNextOffset() > currentMaxOffset) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.