Class StaticTokenAwareMetastoreClientFactory
java.lang.Object
io.trino.plugin.hive.metastore.thrift.StaticTokenAwareMetastoreClientFactory
- All Implemented Interfaces:
TokenAwareMetastoreClientFactory
public class StaticTokenAwareMetastoreClientFactory
extends Object
implements TokenAwareMetastoreClientFactory
-
Constructor Summary
ConstructorsConstructorDescriptionStaticTokenAwareMetastoreClientFactory(StaticMetastoreConfig config, ThriftMetastoreAuthenticationConfig authenticationConfig, ThriftMetastoreClientFactory clientFactory) -
Method Summary
Modifier and TypeMethodDescriptioncreateMetastoreClient(Optional<String> delegationToken) Create a metastore client connected to the Hive metastore.
-
Constructor Details
-
StaticTokenAwareMetastoreClientFactory
@Inject public StaticTokenAwareMetastoreClientFactory(StaticMetastoreConfig config, ThriftMetastoreAuthenticationConfig authenticationConfig, ThriftMetastoreClientFactory clientFactory)
-
-
Method Details
-
createMetastoreClient
public ThriftMetastoreClient createMetastoreClient(Optional<String> delegationToken) throws org.apache.thrift.TException Create a metastore client connected to the Hive metastore.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.
- Specified by:
createMetastoreClientin interfaceTokenAwareMetastoreClientFactory- Throws:
org.apache.thrift.TException
-