Trending September 2023 # Step By Step Installation Of Hive On Ubuntu # Suggested October 2023 # Top 13 Popular | Dacvumuahe.com

Trending September 2023 # Step By Step Installation Of Hive On Ubuntu # Suggested October 2023 # Top 13 Popular

You are reading the article Step By Step Installation Of Hive On Ubuntu updated in September 2023 on the website Dacvumuahe.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested October 2023 Step By Step Installation Of Hive On Ubuntu

How To Install Hive?

Prior Requirement to Install Hive

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

As I said earlier, it’s very important to understand Apache hive runs on top of the Hadoop Ecosystem and Hadoop Should be up and running with all demons.

Some of the basic Hadoop demons are as follows:

Name node

Data node

Resource manager

Node manager

To check the Hadoop version, below is the command:

Type → Hadoop version in command prompt it will give you the version of Hadoop.

To check the Hadoop cluster report trigger below command:

Type →Hadoop dfsadmin –report in command prompt it will give you the whole cluster report if your server is running.

I hope java has been installed already on your system as well. to check the java version, please refer to below screenshot.

Steps To Install Hive on Ubuntu

Below are the steps to install Hive on Ubuntu are as follows:

Step 1: Hive tar we can download by using the below command in the terminal we can directly download from the terminal as well.

Step 2: Extract the tar file; using the below command in the terminal, we can directly extract the tar above the downloaded tar hive tar file.

Command: tar -xzf apache-hive-2.1.0-bin.tar.gz

I will suggest you verify with ls command about extracted hive file.

Step 3: Edit the “.bashrc” file to update the environment variables for the user.

Command: sudo the .bashrc

Add the following at the end of the file:

# Set HIVE_HOME

Execute the below-given command to complete the changes work in the current terminal.

Command: source .bashrc

 Step 5: We need to create Hive directories within the HDFS location. This directory ‘warehouse’ will be the location to store the metadata related information of the hive table and data related to Hive.

Command:

hdfs dfs -mkdir -p /user/hive/warehouse

hdfs dfs -mkdir /tmp

Command:

In the below command, providing write permission to the user group:

hdfs dfs -chmod g+w /user/hive/warehouse

hdfs dfs -chmod g+w /tmp

 Configuring Hive: It’s very important to point of install hive to configure with Hadoop. We need to edit chúng tôi a file which is placed in the $HIVE_HOME/conf directory. The following commands redirect to Hive conf folder and copy the template file:

Step 7: Set a Hadoop path in h chúng tôi

Edit the hive-env.sh file by appending the following line:

Now by this process, we are almost done and the hive installations have been completed successfully it’s important to configure Metastore with the external database server and by default, Apache Hive framework uses Derby database. By using below command Initializing Derby database.

Command: bin/schematool -initSchema -dbType derby

Step 8: Launch Hive.

Command: hive (type hive in the terminal within second hive terminal will open.)

To create a table in the hive it’s very important to refer required database otherwise any table will get created under the default database.

Important commands in Hive

1: show databases (it will show all databases that have been created till yet).

2: create the database if not exists mydb (this command will create one database with the name of ‘mydb’ if ‘mydb’ not exists and if ‘mydb already exists it will not give any error as well’)

3: use database whenever we have to use some DDL command on the particular database we should use the command “use database” in our case we have already created “mydb” show command would be used mydb.

Important Hive DDL command

CREATE, DROP, TRUNCATE, SHOW, DESCRIBE.

Create: – Create a statement used to create a database or create a table in a hive.

Describe provides information about the schema of the table.

TRUNCATE will delete the data of the table.

We can Install the Hive on a window as well, but for best practice, I will prefer Ubuntu to use, it will give a better view of productions environment and your data will increase in the future it will easy to manage.

Recommended Articles

This has been a guide to Install Hive. Here we have discussed the different steps to install Hive, DDL command etc. You may also look at the following articles to learn more:

You're reading Step By Step Installation Of Hive On Ubuntu

Update the detailed information about Step By Step Installation Of Hive On Ubuntu on the Dacvumuahe.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!