Class StaticTokenAwareMetastoreClientFactory

java.lang.Object
io.trino.plugin.hive.metastore.thrift.StaticTokenAwareMetastoreClientFactory
All Implemented Interfaces:
TokenAwareMetastoreClientFactory

public class StaticTokenAwareMetastoreClientFactory extends Object implements TokenAwareMetastoreClientFactory
  • Constructor Details

  • 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:
      createMetastoreClient in interface TokenAwareMetastoreClientFactory
      Throws:
      org.apache.thrift.TException