pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 李运田 <cumt...@163.com>
Subject Re:Re: use hcatalog in eclipse/pig
Date Sat, 28 Feb 2015 01:38:33 GMT
pigServer.registerQuery("tmp = load 'pig' using org.apache.hcatalog.pig.HCatLoader();");
pigServer.registerQuery("tmp = foreach tmp generate id;");
when I execute this,I cant get  any error
but,When I execute
pigServer.registerQuery("store tmp into 'hive' using org.apache.hcatalog.pig.HCatStorer();");
I get error like this:::
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open iterator for
alias tmp
 at org.apache.pig.PigServer.openIterator(PigServer.java:880)
 at org.gradle.PigHiveHCat.run(PigHiveHCat.java:68)
 at org.gradle.PigHiveHCat.main(PigHiveHCat.java:28)
Caused by: java.io.IOException: Job terminated with anomalous status FAILED
 at org.apache.pig.PigServer.openIterator(PigServer.java:872)
 ... 2 more
...........................................................................................................
pigServer.registerQuery("a = LOAD '/user/hadoop/pig.txt' ;");
pigServer.store("a", "/user/hadoop/pig1.txt");
pigServer.registerQuery("store a into '/user/hadoop/pig2.txt';");
........................................this is OK,so I think something about Hcatalog is
wrong...........................








At 2015-02-28 01:21:12, "Alan Gates" <alanfgates@gmail.com> wrote:
What error message are you getting?

Alan.


李运田
February 26, 2015 at 18:58
I want to use hcatalog in eclipse to deal with tables in hive.
but I cant store table into hive::
pigServer.registerQuery("tmp = load 'pig' using org.apache.hcatalog.pig.HCatLoader();");
pigServer.registerQuery("tmp = foreach tmp generate id;");
pigServer.registerQuery("store tmp into 'hive' using org.apache.hcatalog.pig.HCatStorer();");
I can store into file::
pigServer.registerQuery("a = LOAD '/user/hadoop/pig.txt' ;");
pigServer.store("a", "/user/hadoop/pig1.txt");
pigServer.registerQuery("store a into '/user/hadoop/pig2.txt';");
perhaps ,the hcatalog jars are wrong?
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message