-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-27284: Make HMSHandler proxy pluggable #4257
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
Conversation
|
@deniskuzZ @saihemanth-cloudera @veghlaci05: Could you help review this PR? |
|
Kudos, SonarCloud Quality Gate passed! |
|
@wecharyu would you be able to rebase? |
| "testing only."), | ||
| HMS_HANDLER_INTERVAL("metastore.hmshandler.retry.interval", "hive.hmshandler.retry.interval", | ||
| 2000, TimeUnit.MILLISECONDS, "The time between HMSHandler retry attempts on failure."), | ||
| HMS_HANDLER_PROXY_CLASS("metastore.hmshandler.proxy", "hive.metastore.hmshandler.proxy", |
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.
do we really need a config for that, since RetryingHMSHandler it the only implementation at this moment?
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.
This config will make Meta Store Server more easy to extend other proxy strategy without modifying the main server code, so I highly recommend this config.
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.
👍
...metastore-server/src/main/java/org/apache/hadoop/hive/metastore/AbstractHMSHandlerProxy.java
Outdated
Show resolved
Hide resolved
deniskuzZ
left a comment
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.
LGTM, +1 non-binding
|
Kudos, SonarCloud Quality Gate passed! |
|
@wecharyu, thank you for the contribution! let's wait approx 1 week for the feedback from @nrg4878, @saihemanth-cloudera, @dengzhhu653. |
deniskuzZ
left a comment
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.
+1
|
Thanks for the contribution, @wecharyu! |
|
@dengzhhu653 Thanks for your review. In this patch we want |
Retrying on transient exception is a good way to reduce the network roundtrip client retries, besides there has been a property Given the template method Whatever the strategies is, method should is called on the So in my view, if there is no special need to introduce complex strategies on |
|
Yeah, retrying strategy is highly effective in HMS. Actually we just want to refactor the HMSHandler proxy code to be more clear and improve code extensibility. For example we can combine different proxy strategies into one like: class TimerAndRetryingHMSHandler extends AbstractHMSHandlerProxy {
private final IHMSHandler retryingHandler; // replace baseHandler
} |
|
@dengzhhu653, do you have any concerns with the current approach? |
I'm +1 on the idea of removing test codes from main routine. |
I think, regardless if we introduce new custom strategies, the current patch makes the code more readable and extensible/flexible. |
The code itself looks fine to me, though I'm +0 on the factory approach, if we think the benefit wins the complexity and maintenance, I'm fine with the changes. |
…enys Kuzmenko, Zhihua Deng) Closes apache#4257
…enys Kuzmenko, Zhihua Deng) Closes apache#4257








What changes were proposed in this pull request?
HMSHandlerProxy configurable by new metastore conf "metastore.hmshandler.proxy"AbstractHMSHandlerProxyto extend customized handlerHMSHandlerWhy are the changes needed?
HMSHandlerDoes this PR introduce any user-facing change?
Yes, user can use new conf and api to extend their own handler.
How was this patch tested?
Passing all existing tests.