public ThriftHiveMetastoreClient(TTransport transport) { this.transport = requireNonNull(transport, "transport is null"); this.client = new ThriftHiveMetastore.Client(new TBinaryProtocol(transport)); }
protocol = new TBinaryProtocol(transport); client = new ThriftHiveMetastore.Client(protocol); try { if (!transport.isOpen()) {
protocol = new TBinaryProtocol(transport); client = new ThriftHiveMetastore.Client(protocol); if (!transport.isOpen()) { transport.open();
protocol = new TBinaryProtocol(transport); client = new ThriftHiveMetastore.Client(protocol); try { transport.open();
client = new ThriftHiveMetastore.Client(new TBinaryProtocol(transport)); try { transport.open();
protocol = new TBinaryProtocol(transport); client = new ThriftHiveMetastore.Client(protocol); try { transport.open();
client = new ThriftHiveMetastore.Client(protocol);
/** * Create client from host and port with timeout * @param host Host to connect to * @param port Port to connect on * @param timeoutMillis Socket timeout * @return Hive Thrift Metastore client * @throws TTransportException Connection errors */ public static ThriftHiveMetastore.Iface create(String host, int port, int timeoutMillis) throws TTransportException { if (TEST_CLIENT != null) { return TEST_CLIENT; } TTransport transport = new TSocket(host, port, timeoutMillis); transport.open(); TProtocol protocol = new TBinaryProtocol(transport); return new ThriftHiveMetastore.Client(protocol); }
/** * TODO. * * @throws HiveMetastoreException TODO */ private void connect() throws HiveMetastoreException { LOG.info("Connecting to ThriftHiveMetastore " + host + ":" + port); transport = new TSocket(host, port, 1000 * clientSocketTimeout); this.client = new ThriftHiveMetastore.Client(new TBinaryProtocol(transport)); try { transport.open(); } catch (TTransportException e) { close(); throw new HiveMetastoreException(e); } }
/** * TODO. * * @throws HiveMetastoreException TODO */ private void connect() throws HiveMetastoreException { LOG.info("Connecting to ThriftHiveMetastore " + host + ":" + port); transport = new TSocket(host, port, 1000 * clientSocketTimeout); this.client = new ThriftHiveMetastore.Client(new TBinaryProtocol(transport)); try { transport.open(); } catch (TTransportException e) { close(); throw new HiveMetastoreException(e); } }
/** * Create client from host and port with timeout * @param host Host to connect to * @param port Port to connect on * @param timeoutMillis Socket timeout * @return Hive Thrift Metastore client * @throws TTransportException Connection errors */ public static ThriftHiveMetastore.Iface create(String host, int port, int timeoutMillis) throws TTransportException { TTransport transport = new TSocket(host, port, timeoutMillis); transport.open(); TProtocol protocol = new TBinaryProtocol(transport); return new ThriftHiveMetastore.Client(protocol); }
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)); } }
public ThriftHiveMetastoreClient(TProtocol protocol) { this.transport = protocol.getTransport(); this.client = new ThriftHiveMetastore.Client(protocol); }
public HiveThriftClient(String thriftHost, int thriftPort) { transport = new TSocket(thriftHost, thriftPort); try { transport.open(); } catch (TTransportException e) { throw new RuntimeException(e); } TBinaryProtocol protocol = new TBinaryProtocol(transport); client = new ThriftHiveMetastore.Client(protocol); }
public ThriftHiveMetastoreClient(TProtocol protocol) { this.transport = protocol.getTransport(); this.client = new ThriftHiveMetastore.Client(protocol); }
public ThriftHiveMetastoreClient(TTransport transport) { this.transport = requireNonNull(transport, "transport is null"); this.client = new ThriftHiveMetastore.Client(new TBinaryProtocol(transport)); }
public HiveThriftClient(String thriftHost, int thriftPort) { transport = new TSocket(thriftHost, thriftPort); try { transport.open(); } catch (TTransportException e) { throw new RuntimeException(e); } TBinaryProtocol protocol = new TBinaryProtocol(transport); client = new ThriftHiveMetastore.Client(protocol); }
public ThriftHiveMetastoreClient(TTransport transport) { this.transport = requireNonNull(transport, "transport is null"); this.client = new ThriftHiveMetastore.Client(new TBinaryProtocol(transport)); }
protocol = new TBinaryProtocol(transport); client = new ThriftHiveMetastore.Client(protocol); try { if (!transport.isOpen()) {
public ThriftHiveMetastoreClient(TProtocol protocol) { this.transport = protocol.getTransport(); this.client = new ThriftHiveMetastore.Client(protocol); }