Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

While accessing hive tables getting cant find schema error

Solved Go to solution
Highlighted

While accessing hive tables getting cant find schema error

New Contributor

grunt> A = load 'emp1' Using org.apache.hive.hcatalog.pig.HCatLoader(); 2016-03-04 00:31:02,232 [main] INFO org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS 2016-03-04 00:31:02,411 [main] INFO org.apache.hadoop.hive.metastore.HiveMetaStore - 0: Opening raw store with implemenation class:org.apache.hadoop.hive.metastore.ObjectStore 2016-03-04 00:31:02,413 [main] INFO org.apache.hadoop.hive.metastore.ObjectStore - ObjectStore, initialize called 2016-03-04 00:31:02,417 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2245: Cannot get schema from loadFunc org.apache.hive.hcatalog.pig.HCatLoader Details at logfile: /usr/lib/hive-0.13.1-bin/hcatalog/pig_1457031005634.log

1 ACCEPTED SOLUTION

Accepted Solutions

Re: While accessing hive tables getting cant find schema error

Guru

@Gurjinder Singh Make sure you have a table in Hive named 'emp1' in the 'default' database.

5 REPLIES 5

Re: While accessing hive tables getting cant find schema error

Guru

@Gurjinder Singh Make sure you have a table in Hive named 'emp1' in the 'default' database.

Re: While accessing hive tables getting cant find schema error

New Contributor

Rich, even if emp1 in default database it would be giving error. I received the same error for below command.

A = Load 'orders_manage1' USING org.apache.hive.hcatalog.pig.HCatLoader();

Re: While accessing hive tables getting cant find schema error

New Contributor

@Praphul Agarwal @Gurjinder Singh - Here are the steps

1) Add the hive connection property in pig properties - PIG_OPTS=-Dhive.metastore.uris=thrift://localhost:10000

2) restart hiveserver, hivemetastore and pig services

3) create a pig script with the load statement 'using org.apache.hive.hcatalog.pig.HCatLoader();'

4) run the pig script - pig -useHCatalog 'pigscript'

Re: While accessing hive tables getting cant find schema error

New Contributor

@vsithannan

"PIG_OPTS=-Dhive.metastore.uris=thrift://localhost:10000 "

This localhost number depends on hive-site.xml or separately we have to defile mine is

<property> <name>hive.metastore.uris</name> <value>thrift://localhost:9083</value> </property>

can you please help me

Re: While accessing hive tables getting cant find schema error

New Contributor
log-file.txt

This my log file while i was trying to get data from hive

Don't have an account?
Coming from Hortonworks? Activate your account here