04-22-2019 10:06 AM
hive> create table t ( i int );
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Exception thrown when executing query)
Unable to create table as I am facing this error .
I am using cloudera quick start VM.
Thanks in advance.
04-23-2019 06:47 AM
The error message seems generic and there could be multiple reason for this error example service was bad , HMS not able to connect to backend db .
1. Please enabled debug level logging if using hive CLI , this will show us the error which is cuaing this failure:
Below are the steps to enable debug logging for session level
root@hostname ~]# export HADOOP_ROOT_LOGGER=DEBUG,console
[root@hostname ~]# hive --hiveconf hive.root.logger=DEBUG,console -e "create table test(i int)"
2.. Was the hive service up and running when you observed this issue ?
$ sudo service hiveserver start
To start the Hive console:
$ hive hive>
To confirm that Hive is working, issue the show tables; command to list the Hive tables; be sure to use a semi-colon after the command:
hive> show tables; OK Time taken: 10.345 seconds
3.. Did you try using Beeline as well ? if not could you please try connecting via beeline and let us know if that works
Because of concurrency and security issues, HiveServer1 is deprecated in CDH 5 and will be removed in a future release. Cloudera recommends you migrate to Beeline and HiveServer2 as soon as possible. The Hive Console is not needed if you are using Beeline with HiveServer2.
05-07-2019 09:18 PM