-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
get online brokers in pinot spark connector #14802
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14802 +/- ##
============================================
+ Coverage 61.75% 63.83% +2.07%
- Complexity 207 1611 +1404
============================================
Files 2436 2704 +268
Lines 133233 150910 +17677
Branches 20636 23291 +2655
============================================
+ Hits 82274 96327 +14053
- Misses 44911 47368 +2457
- Partials 6048 7215 +1167
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
cc: @ankitsultana |
@@ -33,7 +33,7 @@ import scala.util.{Failure, Success, Try} | |||
*/ | |||
private[pinot] object PinotClusterClient extends Logging { | |||
private val TABLE_SCHEMA_TEMPLATE = "http://%s/tables/%s/schema" | |||
private val TABLE_BROKER_INSTANCES_TEMPLATE = "http://%s/v2/brokers/tables/%s" | |||
private val TABLE_BROKER_INSTANCES_TEMPLATE = "http://%s/v2/brokers/tables/%s?state=%s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you instead use the livebrokers API? We have used it at scale in the past so there are no concerns with whether it works or not.
c9dfa73
to
72eb48a
Compare
72eb48a
to
ec949a9
Compare
@@ -33,7 +33,7 @@ import scala.util.{Failure, Success, Try} | |||
*/ | |||
private[pinot] object PinotClusterClient extends Logging { | |||
private val TABLE_SCHEMA_TEMPLATE = "http://%s/tables/%s/schema" | |||
private val TABLE_BROKER_INSTANCES_TEMPLATE = "http://%s/v2/brokers/tables/%s" | |||
private val LIVE_BROKERS_TEMPLATE = "http://%s/tables/livebrokers?tables=%s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usage is incorrect. table goes in the path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API with path param was deprecated in favour of this one in #12201
bugfix
pinot-spark-connector when reading from Pinot table fetches the broker urls from controller using
http://%s/v2/brokers/tables/%s
.This returns all brokers including dead broker instances as well which can cause the spark job to fail.
This PR updates the controller API uri in request to also filter on state="OFFLINE" so that only a valid list of brokers is fetched.