hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sasha Ostrikov <alexander.ostri...@gmail.com>
Subject Fwd: load Hive veiw in Pig using HCatLoader
Date Sun, 16 Nov 2014 12:52:44 GMT
Hi,
I'm trying to load Hive view into withing Pig script
using org.apache.hive.hcatalog.pig.HCatLoader.
I'm using Hortonworks HDP2.2 with
hive-hcatalog-pig-adapter-0.14.0.2.2.0.0-1084.jar (I also tried HDP 2.1
with hive 0.13).
Loading tables works perfectly.

*My code is as following:*
flat = LOAD 'default.vw_sample_07' USING
org.apache.hive.hcatalog.pig.HCatLoader();
DUMP flat;



*I'm getting the following error:*
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to
open iterator for alias flat
at org.apache.pig.PigServer.openIterator(PigServer.java:923)
at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:760)
at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:372)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:229)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:204)
at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:66)
at org.apache.pig.Main.run(Main.java:557)
at org.apache.pig.Main.main(Main.java:170)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: org.apache.pig.PigException: ERROR 1002: Unable to store alias
flat
at org.apache.pig.PigServer.storeEx(PigServer.java:1026)
at org.apache.pig.PigServer.store(PigServer.java:985)
at org.apache.pig.PigServer.openIterator(PigServer.java:898)
... 13 more
Caused by:
org.apache.pig.backend.hadoop.executionengine.JobCreationException: ERROR
2017: Internal error creating job configuration.
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:998)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:323)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:196)
at
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.launchPig(HExecutionEngine.java:280)
at org.apache.pig.PigServer.launchPlan(PigServer.java:1378)
at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1363)
at org.apache.pig.PigServer.storeEx(PigServer.java:1022)
... 15 more
Caused by: java.io.IOException: java.lang.NullPointerException
at
org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:97)
at
org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:61)
at org.apache.hive.hcatalog.pig.HCatLoader.setLocation(HCatLoader.java:127)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:533)
... 21 more
Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at
org.apache.hive.hcatalog.mapreduce.FosterStorageHandler.<init>(FosterStorageHandler.java:60)
at
org.apache.hive.hcatalog.common.HCatUtil.getStorageHandler(HCatUtil.java:418)
at
org.apache.hive.hcatalog.common.HCatUtil.getStorageHandler(HCatUtil.java:381)
at
org.apache.hive.hcatalog.mapreduce.InitializeInput.extractPartInfo(InitializeInput.java:158)
at
org.apache.hive.hcatalog.mapreduce.InitializeInput.getInputJobInfo(InitializeInput.java:137)
at
org.apache.hive.hcatalog.mapreduce.InitializeInput.setInput(InitializeInput.java:86)
at
org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:95)
... 24 more

Thanks a lot!
Alexander

Mime
View raw message