public class StaticMetastoreLocator extends Object implements MetastoreLocator
| Constructor and Description |
|---|
StaticMetastoreLocator(List<URI> metastoreUris,
String metastoreUsername,
HiveMetastoreClientFactory clientFactory) |
StaticMetastoreLocator(StaticMetastoreConfig config,
HiveMetastoreClientFactory clientFactory) |
| Modifier and Type | Method and Description |
|---|---|
ThriftMetastoreClient |
createMetastoreClient()
Create a metastore client connected to the Hive metastore.
|
@Inject public StaticMetastoreLocator(StaticMetastoreConfig config, HiveMetastoreClientFactory clientFactory)
public StaticMetastoreLocator(List<URI> metastoreUris, String metastoreUsername, HiveMetastoreClientFactory clientFactory)
public ThriftMetastoreClient createMetastoreClient() 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–2019. All rights reserved.