-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add BrokerClient
implementation
#17382
Merged
abhishekrb19
merged 7 commits into
apache:master
from
abhishekrb19:broker_client_explain_plan
Oct 21, 2024
Merged
Add BrokerClient
implementation
#17382
abhishekrb19
merged 7 commits into
apache:master
from
abhishekrb19:broker_client_explain_plan
Oct 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…lan. - Add BrokerClient that leverages the ServiceClient functionality. Add a couple of client APIs that are useful to the scheduled batch supervisor implementation. - Add ExplainPlanInformation class that contains information about a single plan. The BrokerClient leverages this.
kfaraz
reviewed
Oct 19, 2024
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.
Minor comments, otherwise looks good.
sql/src/main/java/org/apache/druid/sql/guice/BrokerServiceModule.java
Outdated
Show resolved
Hide resolved
sql/src/main/java/org/apache/druid/sql/http/ExplainPlanInformation.java
Outdated
Show resolved
Hide resolved
sql/src/main/java/org/apache/druid/sql/http/ExplainPlanInformation.java
Outdated
Show resolved
Hide resolved
sql/src/main/java/org/apache/druid/sql/calcite/planner/ExplainAttributes.java
Outdated
Show resolved
Hide resolved
sql/src/main/java/org/apache/druid/sql/client/BrokerClient.java
Outdated
Show resolved
Hide resolved
sql/src/main/java/org/apache/druid/sql/client/BrokerClient.java
Outdated
Show resolved
Hide resolved
kfaraz
reviewed
Oct 21, 2024
sql/src/main/java/org/apache/druid/sql/guice/BrokerServiceModule.java
Outdated
Show resolved
Hide resolved
sql/src/test/java/org/apache/druid/sql/calcite/planner/ExplainAttributesTest.java
Outdated
Show resolved
Hide resolved
sql/src/main/java/org/apache/druid/sql/http/ExplainPlanInformation.java
Outdated
Show resolved
Hide resolved
kfaraz
approved these changes
Oct 21, 2024
server/src/main/java/org/apache/druid/rpc/guice/ServiceClientModule.java
Outdated
Show resolved
Hide resolved
kirangadhave-imply
pushed a commit
to kirangadhave-imply/druid
that referenced
this pull request
Oct 22, 2024
This patch is extracted from PR 17353. Changes: - Added BrokerClient and BrokerClientImpl to the sql package that leverages the ServiceClient functionality; similar to OverlordClient and CoordinatorClient implementations in the server module. - For now, only two broker API stubs are added: submitSqlTask() and fetchExplainPlan(). - Added a new POJO class ExplainPlan that encapsulates explain plan info. - Deprecated org.apache.druid.discovery.BrokerClient in favor of the new BrokerClient in this patch. - Clean up ExplainAttributesTest a bit and added serde verification.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This patch is extracted from 17353 to make reviewing easier. It includes additional test coverage and javadocs compared to the original patch.
Changes:
BrokerClient
andBrokerClientImpl
to the sql package that leverages theServiceClient
functionality; similar toOverlordClient
andCoordinatorClient
implementations in the server module.submitSqlTask()
andfetchExplainPlan()
.org.apache.druid.discovery.BrokerClient
in the server module that's used by MSQE for a specific use case. This client has a weird contract though, and its retry mechanism is not robust. We should plan to remove it in the future, but for now, it has been marked as deprecated in favor of the newBrokerClient
added in this patch.ExplainPlan
that encapsulates explain plan info.ExplainAttributesTest
a bit and added serde verification.In this patch, the
BrokerClient
and the relatedBrokerServiceModule
that injects it is unused. It will be used by the scheduled batch supervisor running on the Overlord to interact with the Broker.This PR has: