Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Error while executing hive queries from script


Copy link to this message
-
RE: Error while executing hive queries from script
Looks like permission issue.  Check the permission on the table social.  Run the load script as sudo.

Hope this helps!
Chalcy

-----Original Message-----
From: Praveen Bathala [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 10, 2011 10:01 AM
To: [EMAIL PROTECTED]
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
OK
Time taken: 3.823 seconds

Any help is appreciated.

Thanks
- Prvn
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB