OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 56 of file KafkaImporter.cpp.

Member Function Documentation

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

Definition at line 58 of file KafkaImporter.cpp.

References logger::INFO, and LOG.

Referenced by rebalance_cb().

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

+ 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 66 of file KafkaImporter.cpp.

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

68  {
69  LOG(INFO) << "RebalanceCb: " << RdKafka::err2str(err) << ": ";
70 
71  part_list_print(partitions);
72 
73  if (err == RdKafka::ERR__ASSIGN_PARTITIONS) {
74  consumer->assign(partitions);
75  partition_cnt = (int)partitions.size();
76  } else {
77  consumer->unassign();
78  partition_cnt = 0;
79  }
80  eof_cnt = 0;
81  }
static int eof_cnt
#define LOG(tag)
Definition: Logger.h:285
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: