incubator-hcatalog-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atul aggarwal <atul.aggarw...@gmail.com>
Subject Re: Accesing Views created in Hive using HCatLoader in Pig
Date Tue, 05 Mar 2013 07:07:13 GMT
Thanks Travis for the response, you are right I did not send the complete
stack trace. Please find attached the file having complete stack trace. I
am not quiet hopeful that these Hive views can be accessed by HcatLoader.
Since, what I understand from Hcatalog readings is that it works on
Physical layer but Views are on more on logical layer. As when I ran the
same script with table name it ran okay, because that table has physical
data probably and views I think there is no physical data, it is just
reference to the table data. Though, I just wanted someone to confirm my
understanding or if there is any other work around to do it.

Thanks for looking into it. Please let me know if you can suggest something
here.
-A2L


On Mon, Mar 4, 2013 at 6:13 PM, Travis Crawford <traviscrawford@gmail.com>wrote:

> Hey Atul -
>
> Pig logging is a little weird - it shows you some info on the console,
> but provides additional details in its log file.
>
> Can you check if the log file contains a stack trace with more
> details? I've never tried reading a view so not sure if it works. This
> stack doesn't provide a clear answer to what's going on here.
>
> --travis
>
>
> On Mon, Mar 4, 2013 at 4:36 PM, atul aggarwal <atul.aggarwal9@gmail.com>
> wrote:
> > Hi,
> >
> > I am fairly new to HCatlog, and hence I was just trying something in hive
> > and HcatLoader in Pig. What I did is, created a view in Hive and then
> tried
> > to load data by view I created into pig using HcatLoader. But it seems
> it is
> > not working. I just wanted to confirm that is there any way to do this?
> I am
> > getting following error when I tried to load view in pig using HcatLoader
> >
> > events=Load 'ViewName' using org.apache.hcatalog.pig.HCatLoader(); dump
> > events;
> >
> > When I use any tableName instead of View from Hive, it seems to work.
> > Further it does not give metastore error. As it says successfully
> connected
> > to metastore at load statement when it comes to dump, it crashes with the
> > following error.
> >
> > Any Pointers will be helpful.
> >
> > Thanks, Atul
> >
> > org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to
> > open iterator for alias events
> > at org.apache.pig.PigServer.openIterator(PigServer.java:857)
> > at
> org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:682)
> > at
> >
> org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:303)
> > at
> >
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:189)
> > at
> >
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:165)
> > at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
> > at org.apache.pig.Main.run(Main.java:555)
> > at org.apache.pig.Main.main(Main.java:111)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> > Caused by: org.apache.pig.PigException: ERROR 1002: Unable to store alias
> > events
> > at org.apache.pig.PigServer.storeEx(PigServer.java:956)
> > at org.apache.pig.PigServer.store(PigServer.java:919)
> > at org.apache.pig.PigServer.openIterator(PigServer.java:832)
> > ... 12 more
> > Caused by:
> >
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobCreationException:
> > ERROR 2017: Internal error creating job configuration.
> > at
> >
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:731)
> > at
> >
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:259)
> > at
> >
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:180)
> > at org.apache.pig.PigServer.launchPlan(PigServer.java:1270)
> > at
> org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1255)
> > at org.apache.pig.PigServer.storeEx(PigServer.java:952)
> >
> >
>

Mime
View raw message