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

Abstract away BlockingQueue.offer()/poll() which notify after some period of inability to proceed #7037

Open
leventov opened this issue Feb 8, 2019 · 2 comments

Comments

@leventov
Copy link
Member

leventov commented Feb 8, 2019

There are several places in Druid code which implement some sort of untimed BlockingQueue.take(), but they want to notify or log about inability to make progress, so they use BlockingQueue.offer():

/~https://github.com/apache/incubator-druid/blob/fafbc4a80e0bba0c1fbb5066b9f0ce37ffcab929/extensions-contrib/ambari-metrics-emitter/src/main/java/org/apache/druid/emitter/ambari/metrics/AmbariMetricsEmitter.java#L115-L127

/~https://github.com/apache/incubator-druid/blob/fafbc4a80e0bba0c1fbb5066b9f0ce37ffcab929/examples/src/main/java/org/apache/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java#L165-L168

/~https://github.com/apache/incubator-druid/blob/fafbc4a80e0bba0c1fbb5066b9f0ce37ffcab929/extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/indexing/kinesis/KinesisRecordSupplier.java#L176-L179

/~https://github.com/apache/incubator-druid/blob/fafbc4a80e0bba0c1fbb5066b9f0ce37ffcab929/server/src/main/java/org/apache/druid/segment/realtime/firehose/EventReceiverFirehoseFactory.java#L376-L383

/~https://github.com/apache/incubator-druid/blob/fafbc4a80e0bba0c1fbb5066b9f0ce37ffcab929/extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/GraphiteEmitter.java#L109-L121

They all use different strategies and patterns. It might be reasonable to extract this pattern as some sort of utility, or e. g. specify a common "timeout" in druid after which such events are logged, or a configuration might be added to choose between logging and emitting such events as alerts.

@justinborromeo
Copy link
Contributor

Opened #7052 to address the suggested changes above.

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

This issue has been marked as stale due to 280 days of inactivity.
It will be closed in 4 weeks if no further activity occurs. If this issue is still
relevant, please simply write any comment. Even if closed, you can still revive the
issue at any time or discuss it on the dev@druid.apache.org list.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants