Looks like permission issue. Check the permission on the table social. Run the load script as sudo.

Hope this helps!

-----Original Message-----
From: Praveen Bathala
Sent: Saturday, September 10, 2011 10:01 AM
To: user@hive.apache.org
Subject: Error while executing hive queries from script

Hi All,
I am loading data into Hive from a script and I get following error

WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
Hive history file=/tmp/praveen/hive_job_log_praveen_201109100955_48187165.txt
FAILED: Error in semantic analysis: Line 1:14 Table not found social

This is the exact command that runs inside script: /home/myserver/hive/hive-0.7.1/bin/hive -e "LOAD DATA LOCAL INPATH 'social_sample.txt' OVERWRITE INTO TABLE social;"

stack trace in hive logs:

2011-09-10 09:55:52,055 ERROR ql.Driver (SessionState.java:printError(343)) - FAILED: Error in semantic analysis: Line 1:14 Table not found social
org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Table not found social
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:917)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:6594)
at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:340)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:164)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:241)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:425)
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.hadoop.hive.ql.parse.SemanticException: Line 1:14 Table not found social
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:782)
... 12 more

When I run same command in hive command line, it goes through fine

hive> LOAD DATA LOCAL INPATH '/home/myserver/data-load/social_sample.txt' INTO TABLE social;
Copying data from file:/home/myserver/data-load/social_sample.txt
Copying file: file:/home/myserver/data-load/social_sample.txt
Loading data to table default.social
Time taken: 3.823 seconds

Any help is appreciated.

- Prvn

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
groupuser @
categorieshive, hadoop
postedSep 10, '11 at 2:01p
activeSep 12, '11 at 1:41p



site design / logo © 2021 Grokbase