diff --git a/kafka_consumer/datadog_checks/kafka_consumer/client/confluent_kafka_client.py b/kafka_consumer/datadog_checks/kafka_consumer/client/confluent_kafka_client.py index 1b69696af9043..7b18f6768b530 100644 --- a/kafka_consumer/datadog_checks/kafka_consumer/client/confluent_kafka_client.py +++ b/kafka_consumer/datadog_checks/kafka_consumer/client/confluent_kafka_client.py @@ -23,9 +23,6 @@ def kafka_client(self): ) return self._kafka_client - def create_kafka_admin_client(self): - raise NotImplementedError - def get_consumer_offsets_dict(self): return self._consumer_offsets @@ -68,7 +65,6 @@ def reset_offsets(self): self._highwater_offsets = {} def get_partitions_for_topic(self, topic): - try: cluster_metadata = self.kafka_client.list_topics(topic, timeout=self.config._request_timeout_ms / 1000) topic_metadata = cluster_metadata.topics[topic] @@ -195,6 +191,3 @@ def _get_topic_partitions(self, topics, consumer_group): topic_partitions.append(TopicPartition(topic, partition)) return topic_partitions - - def get_broker_offset(self): - raise NotImplementedError diff --git a/kafka_consumer/datadog_checks/kafka_consumer/client/generic_kafka_client.py b/kafka_consumer/datadog_checks/kafka_consumer/client/generic_kafka_client.py index 668667dbeea3f..d31fc2505208f 100644 --- a/kafka_consumer/datadog_checks/kafka_consumer/client/generic_kafka_client.py +++ b/kafka_consumer/datadog_checks/kafka_consumer/client/generic_kafka_client.py @@ -52,11 +52,3 @@ def get_consumer_offsets_dict(self): if self.use_legacy_client: return self.python_kafka_client.get_consumer_offsets_dict() return self.confluent_kafka_client.get_consumer_offsets_dict() - - def create_kafka_admin_client(self): - # TODO when this method is implemented in ConfluentKafkaClient, replace this with: - # if self.use_legacy_client: - # return self.python_kafka_client.get_consumer_offsets() - # return self.confluent_kafka_client.get_consumer_offsets() - - return self.python_kafka_client.create_kafka_admin_client() diff --git a/kafka_consumer/datadog_checks/kafka_consumer/client/kafka_client.py b/kafka_consumer/datadog_checks/kafka_consumer/client/kafka_client.py index 464d69cac3c8b..14371dba90fb5 100644 --- a/kafka_consumer/datadog_checks/kafka_consumer/client/kafka_client.py +++ b/kafka_consumer/datadog_checks/kafka_consumer/client/kafka_client.py @@ -13,10 +13,6 @@ def __init__(self, config, tls_context, log) -> None: self._consumer_offsets = {} self._tls_context = tls_context - @abstractmethod - def create_kafka_admin_client(self): - pass - @abstractmethod def get_consumer_offsets(self): pass