HIVE-29620: RetryingMetaStoreClient uses HiveMetaStoreClientBuilder t…#6499
Open
dengzhhu653 wants to merge 3 commits into
Open
HIVE-29620: RetryingMetaStoreClient uses HiveMetaStoreClientBuilder t…#6499dengzhhu653 wants to merge 3 commits into
dengzhhu653 wants to merge 3 commits into
Conversation
|
deniskuzZ
reviewed
May 26, 2026
| this.conf = new Configuration(Objects.requireNonNull(configuration)); | ||
| boolean isHiveClient = HiveMetaStoreClient.class.getName().equals( | ||
| MetastoreConf.getVar(conf, MetastoreConf.ConfVars.METASTORE_CLIENT_IMPL)); | ||
| if (isHiveClient) { |
deniskuzZ
reviewed
May 26, 2026
| baseMetaStoreClient = JavaUtils.newInstance(mscClass, | ||
| new Class[]{Configuration.class, boolean.class}, | ||
| new Object[]{conf, allowEmbedded}); | ||
| Class<? extends IMetaStoreClient> mscClass = MetastoreConf.getClass( |
Member
There was a problem hiding this comment.
why do you need mscClass under try-catch block?
deniskuzZ
reviewed
May 26, 2026
| LOG.info("Using {} as a base MetaStoreClient", mscClass.getName()); | ||
| MetaStoreClientFactory factory = CLIENT_FACTORIES.get(mscClass); | ||
| if (factory == null) { | ||
| CLIENT_FACTORIES.put(mscClass, factory = new MetaStoreClientFactory(mscClass)); |
Member
There was a problem hiding this comment.
why do you initiate CLIENT_FACTORIES inside createClient ? that doesn't seem a good design
deniskuzZ
reviewed
May 26, 2026
| import java.util.Map; | ||
|
|
||
| public abstract class MetaStoreClientWrapper extends BaseMetaStoreClient { | ||
| public abstract class FilterMetaStoreClient extends BaseMetaStoreClient { |
deniskuzZ
reviewed
May 26, 2026
| return getProxy(hiveConf, new Class[]{Configuration.class, HiveMetaHookLoader.class, Boolean.class}, | ||
| new Object[]{hiveConf, null, allowEmbedded}, null, HiveMetaStoreClient.class.getName() | ||
| ); | ||
| return new HiveMetaStoreClientBuilder(hiveConf, allowEmbedded).withRetry(null).build(); |
Member
There was a problem hiding this comment.
do we really need to specify withRetry(null) ?
deniskuzZ
reviewed
May 26, 2026
| return new HiveMetaStoreClientBuilder(hiveConf, allowEmbedded) | ||
| .withHooks(hookLoader).withRetry(metaCallTimeMap).build(); | ||
| } finally { | ||
| MetastoreConf.setVar(hiveConf, ConfVars.METASTORE_CLIENT_IMPL, origClientImpl); |
This file contains hidden or 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
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.



…o build the client
What changes were proposed in this pull request?
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?