Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

While accessing hive tables getting cant find schema error

avatar
New Member

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

avatar
Guru

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

View solution in original post

5 REPLIES 5

avatar
Guru

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

avatar

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();

avatar
New Member

@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'

avatar

@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

avatar
log-file.txt

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