Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ingest): kafka ingest task hand up with error bootstrap server #6820

Merged
merged 6 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions metadata-ingestion/src/datahub/configuration/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class _KafkaConnectionConfig(ConfigModel):
description="Extra schema registry config serialized as JSON. These options will be passed into Kafka's SchemaRegistryClient. https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html?#schemaregistryclient",
)

client_timeout_seconds: int = Field(default=60, description="The request timeout used when interacting with the Kafka APIs.")

@validator("bootstrap")
def bootstrap_host_colon_port_comma(cls, val: str) -> str:
for entry in val.split(","):
Expand Down
4 changes: 3 additions & 1 deletion metadata-ingestion/src/datahub/ingestion/source/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ def create(cls, config_dict: Dict, ctx: PipelineContext) -> "KafkaSource":
return cls(config, ctx)

def get_workunits(self) -> Iterable[MetadataWorkUnit]:
topics = self.consumer.list_topics().topics
topics = self.consumer.list_topics(
timeout=self.source_config.connection.client_timeout_seconds
).topics
extra_topic_details = self.fetch_extra_topic_details(topics.keys())

for t, t_detail in topics.items():
Expand Down