Heta Desai
Heta Desai

Reputation: 57

Error while trying to store pig output to the Hive Table

I created the Hive Table under database testdb:

create table tbl2 (year string, DeptTime string, ArrTime string) stored as ORC;

after that i created the following Pig Script:

A = LOAD '/test/input/' USING PigStorage(',') AS (year:chararray,ArrTime:chararray,DeptTime:chararray);

describe A;

dump A;

while executing the above script it works fine.

But adding following line to store pig output to hive it will throw an error.

A = LOAD '/test/input/' USING PigStorage(',') AS (year:chararray,ArrTime:chararray,DeptTime:chararray);

describe A;

dump A;

store A into 'testdb.tbl2' using org.apache.hive.hcatalog.pig.HCatStorer();

used PIG Argument -useHCatalog

Error:

ls: cannot access '/mnt/resource/hadoop/yarn/local/usercache/admin/appcache/application_1493274253049_0026/container_1493274253049_0026_01_000002/hive.tar.gz/hive/lib/slf4j-api-*.jar': No such file or directory ls: cannot access '/mnt/resource/hadoop/yarn/local/usercache/admin/appcache/application_1493274253049_0026/container_1493274253049_0026_01_000002/hive.tar.gz/hive/hcatalog/lib/hbase-storage-handler-.jar':

Upvotes: 0

Views: 119

Answers (1)

Sumit
Sumit

Reputation: 1430

Have you started hive thrift server? If not, use below command and then check

hive --service metatore

Upvotes: 0

Related Questions