Installing Hadoop 3.1.0 in Windows 10
Tags: hadoop, windows10, insallinghadoop
Published: 2023-01-18 16:01:36

**Step 1:** Install Java JDK 1.8 in system

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pluwje4347floq4msyai.png)

After downloading java check your java version through this command on cmd.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w722dzg56iovv7l4tqu8.png)

**Step 2:** Download Hadoop version 3.1 and extract it to C:\ drive.
[Hadoop version 3.1.0](https://archive.apache.org/dist/hadoop/common/hadoop-3.1.0/hadoop-3.1.0.tar.gz)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmcaz70ztc7p190tajx7.png)

**Step 3:** Setup System Environment Variables

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uaz37oapz39nzx79f4ez.png)

To edit the system environment variable, go to environment variable in system properties.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ksvdm6qsl0osxngzy888.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hiny7k5f3ld5qq2rkrgc.png)

**Create 2 new user variables:**

1. Variable Name: HADOOP_HOME
   Variable Value: The path of bin folder where extracted Hadoop.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gpcuc5mzp4ag1dxlar1m.png)

2. Variable Name: JAVA_HOME
   Variable Value: The path of the bin folder in the Java directory.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gcwn01j9smz1lk4i6ksi.png)

To set Hadoop bin directory and Java bin directory path in system variable path, edit Path in the system variable.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ea5ubxaxjweq88igp68b.png)

Click on New and add the bin directory path of Hadoop and Java in it.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bb0djyjfj3sttlzolx73.png)

**Step 4:** Configuration
Edit some files located in the Hadoop directory of the etc folder.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2uhqqgf5mqhx3t1sm8ci.png)

Go to this [link](https://github.com/SaishJ/Hadoop-3.1.0)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/acf1xbq3ze8cswmshcjl.png)

Download the files and replace it at same location

- add bin_new in hadoop directory.

- add `core-site.xml`, `hdfs-site.xml`, `mapred-site.xml`, `yarn-site.xml` in `etc/hadoop` directory.

Inside `etc/hadoop` directory edit `hadoop-env.cmd`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8vtpl4kaxkb6si05mqex.png)

Replace `%JAVA_HOME%` with the path of the `java` folder where the `jdk1.8` is installed and save it.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yx5tw60pmi2vjxkpka28.png)

Rename `bin` folder to `bin_old` and rename `bin_new` to `bin`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zasn0bh4r60dyyqcpjz3.png)

Check whether hadoop is successfully installed by running this command hadoop version on cmd.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/781k4zlzp6tim9rgsolh.png)

**Hadoop is successfully installed in the system.**

In above downloaded GitHub folder copy `hadoop-yarn-server-timelineservice-3.1.0.jar` file and paste in `hadoop/share/hadoop/yarn` folder.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x6tbyz3av164j4ttmyj4.png)

**Step 5:** Format NameNode
_Once the hadoop is installed, the NameNode is formatted. This is done to avoid deletion of all the data inside HDFS._

Run following command to format NameNode:
`hdfs namenode -format`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sk7api9ct5kuoc6adqol.png)

**Step 6:** To start run all the Apache Hadoop Distribution
_Change the directory in cmd to sbin folder of hadoop directory using following command_
`cd C:\hadoop\hadoop-3.1.0\sbin`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k2wathy5g8v21xcvn5k6.png)

Start namenode and datanode using `start-dfs.cmd` command.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/333wshtm9oj3zvwjho1n.png)

_Two cmd windows will open for NameNode and DataNode_

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/adcax67ssgraz66n069w.png)

Start yarn using `start-yarn.cmd` command.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v9o5bstix86i4x3v88yu.png)

_Two more windows will open, one for yarn resource manager and one for yarn node manager_

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uaotbo2qshkof8t5nuhs.png)

**Step 7:** Verification
To access information about resource manager current jobs, successful and failed jobs, go to this link in browser- [http://localhost:8088/cluster](http://localhost:8088/cluster)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zlok7yzom0mqmgg2tt9s.png)

#### Thank You for Reading