harinirajendran opened a new pull request, #14281:
URL: https://github.com/apache/druid/pull/14281

   ## Details
   Adding the new SegmentMetadataEvent and publishing these segment-related 
metadata events into Kafka by enhancing the KafkaEmitter
   
   ## Description
   In this PR, we are enhancing KafkaEmitter, to emit metadata about published 
segments (SegmentMetadataEvent) into a Kafka topic. This segment metadata 
information that gets published into Kafka, can be used by any other downstream 
services to query Druid intelligently based on the segments published. There 
are two formats in which the segment metadata can be published to the kafka 
topic. By default, it's in json format. If the downstream applications want to 
consume this event in a backward compatibile format, then we can configure 
kafkaEmitter to publish this event in protobuf format.
   
   ## Old behavior of Kafka Emitter
   Kafka Emitter always emits metrics and alerts and would emit requests if the 
config request.topic is configured.
   Configs metric.topic and alert.topic are always mandatory and cannot be null.
   
   ## Current behavior of Kafka Emitter [with backwards compatibility]
   We introduced a new config named event.types which dictates the types of 
events we want the KafkaEmitter to emit. This config takes in a list of strings 
and can have one or more from [alerts, metrics, requests and segmentMetadata]. 
And based on this config, alert.topic, request.topic, metric.topic and 
segmentMetadata.topic should be configured and not left empty.
   If no event.types is set, then by default, the kafka emitter would emit 
metrics and alerts. And in that case, to maintain backwards compatibility, 
decision to send out requests are based on if request.topic is empty or set.
   
   ## Segment Metadata format
   The emitter by default would emit the metadata in json string format. If 
segment.metadata.format is set to protobuf, then the emitter emits it in 
protobuf format.
   
   This PR has:
   
   - [ ] been self-reviewed.
      - [ ] using the [concurrency 
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
 (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to