OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RebalanceCb Class Reference
+ Inheritance diagram for RebalanceCb:
+ Collaboration diagram for RebalanceCb:

Public Member Functions

void rebalance_cb (RdKafka::KafkaConsumer *consumer, RdKafka::ErrorCode err, std::vector< RdKafka::TopicPartition * > &partitions) override
 

Static Private Member Functions

static void part_list_print (const std::vector< RdKafka::TopicPartition * > &partitions)
 

Detailed Description

Definition at line 58 of file KafkaImporter.cpp.

Member Function Documentation

static void RebalanceCb::part_list_print ( const std::vector< RdKafka::TopicPartition * > &  partitions)
inlinestaticprivate

Definition at line 60 of file KafkaImporter.cpp.

References logger::INFO, and LOG.

Referenced by rebalance_cb().

60  {
61  for (unsigned int i = 0; i < partitions.size(); i++) {
62  LOG(INFO) << "\t" << partitions[i]->topic() << "[" << partitions[i]->partition()
63  << "]";
64  }
65  }
#define LOG(tag)
Definition: Logger.h:185

+ Here is the caller graph for this function:

void RebalanceCb::rebalance_cb ( RdKafka::KafkaConsumer *  consumer,
RdKafka::ErrorCode  err,
std::vector< RdKafka::TopicPartition * > &  partitions 
)
inlineoverride

Definition at line 68 of file KafkaImporter.cpp.

References eof_cnt, logger::INFO, LOG, part_list_print(), and partition_cnt.

70  {
71  LOG(INFO) << "RebalanceCb: " << RdKafka::err2str(err) << ": ";
72 
73  part_list_print(partitions);
74 
75  if (err == RdKafka::ERR__ASSIGN_PARTITIONS) {
76  consumer->assign(partitions);
77  partition_cnt = (int)partitions.size();
78  } else {
79  consumer->unassign();
80  partition_cnt = 0;
81  }
82  eof_cnt = 0;
83  }
static int eof_cnt
#define LOG(tag)
Definition: Logger.h:185
static int partition_cnt
static void part_list_print(const std::vector< RdKafka::TopicPartition * > &partitions)

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: