Dear Learner,

I hope you are doing good.

In Edureka VM, we have not set any hive-site.xml because of which you will not be able to find it.

As you are facing issue with starting the hive with Derby database, I would suggest you to use MySQL as hive metastore and try it.

Please follow the steps below to set MySQL as hive metastore.

Open a terminal and run below commands.
Command: sudo service mysqld restart
Command: sudo yum install mysql-connector-java 
Command: ln -s /usr/share/java/mysql-connector-java.jar /usr/lib/hive-0.13.1-bin/lib/mysql-connector-java.jar

Open MySQL shell.
Command: mysql -u root

CREATE DATABASE hivemetastore;
use hivemetastore;
CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES on hivemetastore.* to hive@localhost;
flush privileges;


Setting the hive properties
Command: cd /usr/lib/hive-0.13.1-bin/conf/
Command: sudo gedit hive-site.xml

Add the below lines in it.

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
 
<configuration>
 
<property>
  <name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:mysql://localhost/hivemetastore</value>
  <description>the URL of the MySQL database</description>
</property>
<property>
  <name>javax.jdo.option.ConnectionDriverName</name>
  <value>com.mysql.jdbc.Driver</value>
</property>
<property>
  <name>javax.jdo.option.ConnectionUserName</name>
  <value>hive</value>
</property>
<property>
  <name>javax.jdo.option.ConnectionPassword</name>
  <value>hive</value>
</property>
</configuration> 
 
Command: source hive-site.xml

Open a new terminal and login to hive shell.
Command: hive

Now create the table, load the data , run select query and check.