Skip to content

Add supervisor log when task count is greater than partitions#16948

Merged
georgew5656 merged 7 commits intoapache:masterfrom
georgew5656:addSupervisorLog
Aug 26, 2024
Merged

Add supervisor log when task count is greater than partitions#16948
georgew5656 merged 7 commits intoapache:masterfrom
georgew5656:addSupervisorLog

Conversation

@georgew5656
Copy link
Copy Markdown
Contributor

@georgew5656 georgew5656 commented Aug 22, 2024

Currently streaming supervisors will handle the case where the # of task groups is greater than the # of partitions available by truncating the # of task groups to the # of partitions (see KafkaSupervisor.getTaskGroupIdForPartition). This is okay behavior but its nice to know when this situation occurs (because it indicates the kafka topic should be scaled up).

Description

Add a warn log when discovering partitions from streams if the # of discovered partitions is less than the number of task groups configured. This seemed like the best place to do this.

The other place i considered was in generateReport, but thats only called when the supervisor /status endpoint is called or if debug logging is enabled.

Release note

  • add a informational log when task groups > partition count.

Key changed/added classes in this PR
  • SeekableStreamSupervisor

This PR has:

  • been self-reviewed.
  • 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
  • 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 is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Copy link
Copy Markdown
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor suggestions

georgew5656 and others added 3 commits August 23, 2024 08:27
…blestream/supervisor/SeekableStreamSupervisor.java

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>
…blestream/supervisor/SeekableStreamSupervisor.java

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>
…blestream/supervisor/SeekableStreamSupervisor.java

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>
@georgew5656 georgew5656 requested a review from kfaraz August 23, 2024 15:27
@georgew5656 georgew5656 merged commit 7ee7e19 into apache:master Aug 26, 2024
hevansDev pushed a commit to hevansDev/druid that referenced this pull request Aug 29, 2024
…#16948)

* Add log message when task count is higher than partitions

* newline

* fix ordering

* Add supervisor id

* Update indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>

* Update indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>

* Update indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>

---------

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>
edgar2020 pushed a commit to edgar2020/druid that referenced this pull request Sep 5, 2024
…#16948)

* Add log message when task count is higher than partitions

* newline

* fix ordering

* Add supervisor id

* Update indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>

* Update indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>

* Update indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>

---------

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>
@kfaraz kfaraz added this to the 31.0.0 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants