Re: HiveMetaStoreClient

2015-08-26 Thread Jerrick Hoang
Hi Subroto, thanks for the suggestion, so I've read the api and looks like setVar is the better way to go for me so I did this HiveConf conf = new HiveConf(); conf.setVar(HiveConf.ConfVars.METASTOREURIS, "some-uri"); return new HiveMetaStoreClient(conf); but I keep getting ` error: cannot access

Re: HiveMetaStoreClient

2015-08-26 Thread Subroto Sanyal
Try something like: HiveConf hiveConf; hiveConf=new HiveConf(); hiveConf.addResource("/etc/hive/conf/hive-default.xml"); HiveMetaStoreClient hiveClient; try { hiveClient = new HiveMetaStoreClient(hiveConf); // use the client; } catch (Exception exp) { exp.printStackTrace(); } On Wed, Aug 26, 2015

Re: HiveMetaStoreClient

2015-08-26 Thread Jerrick Hoang
Thanks all, that was super quick and helpful! Can someone give me a quick code example of how to create a HiveMetaStoreClient object from configurations in hive-site.xml, or how would I create a HiveMetaStoreClient object given the uri and the credentials to talk to the thrift server? On Wed, Aug

Re: HiveMetaStoreClient

2015-08-26 Thread Alan Gates
Yes, sorry, I wasn't clear. As others have stated, HiveMetaStoreClient uses the thrift API. So using that should be fine. Alan. Subroto Sanyal August 26, 2015 at 10:07 Hi Jerrick, HiveMetastoreClient will be using thrift communication internally via the connect

Re: HiveMetaStoreClient

2015-08-26 Thread Nathan Bamford
Hi Jerrick, I'm sure someone more knowledgeable will correct me if I'm wrong, but I believe that class operates over the thrift api. Nathan From: Jerrick Hoang Sent: Wednesday, August 26, 2015 9:44 AM To: user@hive.apache.org S

Re: HiveMetaStoreClient

2015-08-26 Thread Subroto Sanyal
Hi Jerrick, HiveMetastoreClient will be using thrift communication internally via the connection. IMO It is no different from using thrift api. Cheers, Subroto Sanyal On Wed, Aug 26, 2015 at 6:44 PM, Jerrick Hoang wrote: > Ok, I'm super confused now. The hive metastore is a RDBMS database. I >

Re: HiveMetaStoreClient

2015-08-26 Thread Jörn Franke
Why not use hcatalog web service api? Le mer. 26 août 2015 à 18:44, Jerrick Hoang a écrit : > Ok, I'm super confused now. The hive metastore is a RDBMS database. I > totally agree that I shouldn't access it directly via jdbc. So what about > using this class > http://hive.apache.org/javadocs/r0.

Re: HiveMetaStoreClient

2015-08-26 Thread Jerrick Hoang
Ok, I'm super confused now. The hive metastore is a RDBMS database. I totally agree that I shouldn't access it directly via jdbc. So what about using this class http://hive.apache.org/javadocs/r0.13.1/api/metastore/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.html ? Is it something that can

Re: HiveMetaStoreClient

2015-08-26 Thread Alan Gates
Accessing the RDBMS directly isn't recommended. We don't view the table layout as part of the public API and sometimes change things between releases. With the thrift API we at least try to keep it backwards compatible. Alan. Dr Mich Talebzadeh August 26, 2015

Re: HiveMetaStoreClient

2015-08-26 Thread Jörn Franke
What about using the hcatalog apis? Le mer. 26 août 2015 à 8:27, Jerrick Hoang a écrit : > Hi all, > > I want to interact with HiveMetaStore table from code and was looking at > http://hive.apache.org/javadocs/r0.13.1/api/metastore/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.html > , wa

Re: HiveMetaStoreClient

2015-08-26 Thread Dr Mich Talebzadeh
Personally from my experience having your hive metastore on Oracle offers the best concurrency. Oracle locking and concurrency is best suited for metastore to avoid deadlocks and excessive serialisation. On 26/8/2015, "Subroto Sanyal" wrote: >hi Jerrick > >Yes, thats the correct way to interac

Re: HiveMetaStoreClient

2015-08-26 Thread Subroto Sanyal
hi Jerrick Yes, thats the correct way to interact with HiveMetastore(provided you are only interested to play around metadata and Hive Metastore Service is accessible from the java client). Further, you can try the Hive JDBC driver or Hive Server2 thrift API (couldn't find the documentation for th

Re: HiveMetaStoreClient

2015-08-26 Thread Dr Mich Talebzadeh
What is your hive metastore is on? If it is on an RDBMS, then you can simply use client/JDBC tools to access the metastore. Pretty simple. HTH, On 26/8/2015, "Jerrick Hoang" wrote: >Hi all, > >I want to interact with HiveMetaStore table from code and was looking at >http://hive.apache.org/jav

Re: HiveMetaStoreClient error

2015-06-04 Thread Chinna Rao Lalam
What is the error, can you add here.. On Thu, Jun 4, 2015 at 3:51 PM, Ankita Jhar wrote: > Hi, > I attempted to configure the remote metastore I hive which did not > succeed , so I reverted hive-site.XML settings to the previous ones ...now > whenever I make any new changes to hive-site.XML I

Re: HiveMetaStoreClient only sees one of my DBs ?

2013-12-30 Thread Yang
thanks, I fixed it. it turns out that I need to put my hive-site.xml into classpath, without this, it still mysteriously works and somehow gave me a "default" db. (I wish it had given a more explicit error ) On Mon, Dec 30, 2013 at 12:42 PM, java8964 wrote: > Best mailing list for this questi

RE: HiveMetaStoreClient only sees one of my DBs ?

2013-12-30 Thread java8964
Best mailing list for this question is hive, but I will try to give my guess here anyway. If you only see 'default' database, most likely you are using hive 'LocalMetaStore'. For helping yourself to find out the problem, try to find out following information: 1) What kind of Hive metastore you a