Java Code Examples for org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore#Client
The following examples show how to use
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore#Client .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ThriftHiveMetastoreClient.java From presto with Apache License 2.0 | 5 votes |
public ThriftHiveMetastoreClient(TTransport transport, String hostname) { this.transport = requireNonNull(transport, "transport is null"); ThriftHiveMetastore.Client client = new ThriftHiveMetastore.Client(new TBinaryProtocol(transport)); if (log.isDebugEnabled()) { this.client = newProxy(ThriftHiveMetastore.Iface.class, new LoggingInvocationHandler(client, PARAMETER_NAMES_PROVIDER, log::debug)); } else { this.client = client; } this.hostname = requireNonNull(hostname, "hostname is null"); }
Example 2
Source File: HiveTables.java From iceberg with Apache License 2.0 | 5 votes |
private ThriftHiveMetastore.Client getClient() { final URI metastoreUri = URI.create(MetastoreConf.getAsString(conf, THRIFT_URIS)); final int socketTimeOut = (int) MetastoreConf.getTimeVar(conf, CLIENT_SOCKET_TIMEOUT, TimeUnit.MILLISECONDS); TTransport transport = new TSocket(metastoreUri.getHost(), metastoreUri.getPort(), socketTimeOut); try { transport.open(); } catch (TTransportException e) { throw new RuntimeException("failed to open socket for " + metastoreUri + " with timeoutMillis " + socketTimeOut); } return new ThriftHiveMetastore.Client(new TBinaryProtocol(transport)); }
Example 3
Source File: HiveCompatibleThriftHiveMetastoreIfaceFactory.java From waggle-dance with Apache License 2.0 | 5 votes |
private CloseableThriftHiveMetastoreIface newInstance( ThriftHiveMetastore.Client delegate, HiveThriftMetaStoreIfaceCompatibility compatibility) { ClassLoader classLoader = CloseableThriftHiveMetastoreIface.class.getClassLoader(); Class<?>[] interfaces = new Class<?>[] { CloseableThriftHiveMetastoreIface.class }; ThriftMetaStoreClientInvocationHandler handler = new ThriftMetaStoreClientInvocationHandler(delegate, compatibility); return (CloseableThriftHiveMetastoreIface) Proxy.newProxyInstance(classLoader, interfaces, handler); }
Example 4
Source File: HiveTableOperations.java From iceberg with Apache License 2.0 | 4 votes |
protected HiveTableOperations(Configuration conf, ThriftHiveMetastore.Client metaStoreClient, String database, String table) { super(conf); this.metaStoreClient = metaStoreClient; this.database = database; this.tableName = table; }
Example 5
Source File: HiveCompatibleThriftHiveMetastoreIfaceFactory.java From waggle-dance with Apache License 2.0 | 4 votes |
ThriftMetaStoreClientInvocationHandler( ThriftHiveMetastore.Client delegate, HiveThriftMetaStoreIfaceCompatibility compatibility) { this.delegate = delegate; this.compatibility = compatibility; }
Example 6
Source File: HiveCompatibleThriftHiveMetastoreIfaceFactory.java From waggle-dance with Apache License 2.0 | 4 votes |
public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); }
Example 7
Source File: HiveThriftMetaStoreIfaceCompatibility1xx.java From waggle-dance with Apache License 2.0 | 4 votes |
public HiveThriftMetaStoreIfaceCompatibility1xx(ThriftHiveMetastore.Client client) { this.client = client; }