public class StaticMetastoreLocator extends Object implements MetastoreLocator
| Constructor and Description |
|---|
StaticMetastoreLocator(List<URI> metastoreUris,
String metastoreUsername,
ThriftMetastoreClientFactory clientFactory) |
StaticMetastoreLocator(StaticMetastoreConfig config,
HiveAuthenticationConfig hiveAuthenticationConfig,
ThriftMetastoreClientFactory clientFactory) |
| Modifier and Type | Method and Description |
|---|---|
ThriftMetastoreClient |
createMetastoreClient(Optional<String> delegationToken)
Create a metastore client connected to the Hive metastore.
|
@Inject public StaticMetastoreLocator(StaticMetastoreConfig config, HiveAuthenticationConfig hiveAuthenticationConfig, ThriftMetastoreClientFactory clientFactory)
public StaticMetastoreLocator(List<URI> metastoreUris, @Nullable String metastoreUsername, ThriftMetastoreClientFactory clientFactory)
public ThriftMetastoreClient createMetastoreClient(Optional<String> delegationToken) throws org.apache.thrift.TException
As per Hive HA metastore behavior, return the first metastore in the list list of available metastores (i.e. the default metastore) if a connection can be made, else try another of the metastores at random, until either a connection succeeds or there are no more fallback metastores.
createMetastoreClient in interface MetastoreLocatororg.apache.thrift.TExceptionCopyright © 2012–2020. All rights reserved.