presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/thrift/Transport.java/Transport/create
class Transport:    public static TTransport create(
            HostAndPort address,
            Optional<SSLContext> sslContext,
            Optional<HostAndPort> socksProxy,
            int timeoutMillis,
            HiveMetastoreAuthentication authentication,
            Optional<String> delegationToken)
            throws TTransportException
    {
        requireNonNull(address, "address is null");
        try {
            TTransport rawTransport = createRaw(address, sslContext, socksProxy, timeoutMillis);
            TTransport authenticatedTransport = authentication.authenticate(rawTransport, address.getHost(), delegationToken);
            if (!authenticatedTransport.isOpen()) {
                authenticatedTransport.open();
            }
            return new TTransportWrapper(authenticatedTransport, address);
        }
        catch (TTransportException e) {
            throw rewriteException(e, address);
        }
    }