Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

why am I getting a java error while creating a database using root user and Hive.?

Highlighted

why am I getting a java error while creating a database using root user and Hive.?

New Contributor

I login to hortonusing root user and tried creating databse in hive using following command. What am I doing wrong here ??

hive> create database vorq;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:java.io.IOException: Failed on local exception: java.io.IOException: Couldn't set up IO streams; Host Details : local host is: "sandbox-hdp.hortonworks.com/x.x.x.x"; destination host is: "sandbox-hdp.hortonworks.com":8020; )

1 REPLY 1

Re: why am I getting a java error while creating a database using root user and Hive.?

Expert Contributor

Use the Hive user as follows to open hive command line:

sudo su - hive

hive

hive> create database vorq;

Additionally you should use beeline:

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_data-access/content/beeline-vs-hive-cli....

If this answer helps, please click ACCEPT.