added code to create kafka topic 'TAG_PROP_EVENTS' and push events to… #3978
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
added better config to make sure messages are emitted to the right topic
removed 'assetGuid' from kafka message to remove duplication
Refactor: Wrap
ApplicationProperties.get()
andKafkaNotification
initialization in try-catch blocksApplicationProperties.get()
andKafkaNotification
initialization.AtlasException
is caught and rethrown asRuntimeException
for better runtime error propagation.Refactor: Initialize and in constructor with exception handling
Refactor: Initialize 'configuration' and 'kfknotif' in 'EntityGraphMapper' constructor with exception handling
Implement Enhanced Kafka Topic Management and Partitioned Messaging in Apache Atlas
This commit introduces comprehensive enhancements to Apache Atlas's Kafka integration, focusing on dynamic topic management, partition-specific messaging, and configuration improvements to support scalability and efficient data distribution across Kafka topics.
Detailed Changes:
Dynamic Topic Creation:
createTopics
in theKafkaUtils
class. This method facilitates the creation of Kafka topics with configurable numbers of partitions and replication factors, derived from a list of topic details. This allows for more granular control over topic configurations directly from the application layer.Configuration Management Enhancements:
atlas_config.py
to automatically include the newTAG_PROP_EVENTS
topic in the list of topics initialized at startup, ensuring that this topic is available for event propagation without manual configuration.NOTIFICATION_PROPAGATION_TOPIC_NAME
inAtlasConfiguration.java
, standardizing the topic name across the codebase and reducing the risk of hard-coded string errors.Partition-Specific Messaging Capabilities:
KafkaNotification
andAbstractNotification
classes to include methods that support sending messages to specific partitions. This feature is critical for directing messages to particular segments of a topic, thereby optimizing the workload distribution and message consumption based on topic partitioning.EntityGraphMapper
using Guava's consistent hashing algorithm. This calculation uses the SHA-256 hash of a parent task's GUID to determine the partition, ensuring that related messages are co-located in the same partition for improved processing efficiency.Dependency Updates:
Error Handling and Logging Improvements:
This push has changes related to Kafka topic partitioning and configuration enhancements. Details are below:
1. Introduced a constant TAG_PROP_EVENTS_PARTITION_COUNT for Kafka partition value management.
2. Updated AtlasTopicCreator to use configurable partition counts for topics dynamically.
3. Refactored EntityGraphMapper to use the new constant for partition count initialization.
added code to send kafka message to topic 'TAG_PROP_EVENTS'
Change description
Type of change
Related issues
Checklists
Development
Security
Code review