You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by smartzjp <sm...@hotmail.com> on 2015/01/06 10:06:09 UTC
use HiveMetaStoreClient to getAllDatabases error
my code
HiveConf conf = new HiveConf();
conf.set(HiveConf.ConfVars.METASTOREURIS.toString(), "thrift://10.136.122.199:10000");
HiveMetaStoreClient hmsc = new HiveMetaStoreClient(conf);
System.out.println(hmsc.getAllDatabases());
the error is
33 [main] INFO hive.metastore – Connected to metastore.
org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_open_txns(ThriftHiveMetastore.java:3412)
at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.open_txns(ThriftHiveMetastore.java:3399)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.openTxns(HiveMetaStoreClient.java:1563)