<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Basu Patil on Medium]]></title>
        <description><![CDATA[Stories by Basu Patil on Medium]]></description>
        <link>https://medium.com/@basupatil09?source=rss-e69366202760------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HHpTXXG_ecJ8ltQSxwGuXw.jpeg</url>
            <title>Stories by Basu Patil on Medium</title>
            <link>https://medium.com/@basupatil09?source=rss-e69366202760------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 07:50:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@basupatil09/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Install Apache Hive 4.0.1 on Windows 11 with Hadoop 3.3.6: Step-by-Step Setup]]></title>
            <link>https://medium.com/@basupatil09/how-to-install-apache-hive-4-0-1-on-windows-11-with-hadoop-3-3-6-step-by-step-setup-82536d5bf152?source=rss-e69366202760------2</link>
            <guid isPermaLink="false">https://medium.com/p/82536d5bf152</guid>
            <category><![CDATA[hive]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Basu Patil]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 14:57:34 GMT</pubDate>
            <atom:updated>2026-11-25T14:57:34.980Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Run SQL queries on your local HDFS from a Windows 11 laptop, without Linux, WSL, or Docker.</em></p><p>Hive lets you query data stored in Hadoop using SQL. It is a core tool in the Hadoop ecosystem, and it is also the one that is hardest to get running cleanly on Windows.</p><p>This tutorial walks you through installing Apache Hive 4.0.1 on Windows 11 on top of the Hadoop 3.3.6 setup from the first article in this series. Hive stores its table definitions in a metastore database, and for a single-user learning setup we use Apache Derby in embedded mode. Everything is configured by hand: you edit configuration files in Notepad, extract archives, initialize the metastore, and launch Hive with a single reusable script.</p><blockquote><strong><em>Note:</em></strong><em> This setup is intended for a local learning or lab environment. Hive is not officially supported on Windows: the Apache installation guide covers Linux and Mac, and the binary package does not include a ready-to-use Windows launcher. Instead of the usual </em><em>hive command, this tutorial starts Hive’s Java classes directly. It assumes you have completed the Hadoop 3.3.6 setup from the first article, including Java 8, </em><em>HADOOP_HOME, and the matching Hadoop 3.3.6 winutils files.</em></blockquote><h3>Why Hive 4.0.1?</h3><p>The Hive downloads page lists the 4.0.x releases as working with Hadoop 3.3.6. Hive 4.1 and later target Hadoop 3.4.1 instead, and Hive 4.2 requires JDK 21 as a minimum. The 3.x line has reached end of life. Hive 4.0.1 is the release that matches the Hadoop 3.3.6 and Java 8 setup used throughout this series.</p><p>For the metastore we use Apache Derby 10.14.2.0, the final Derby line that runs on Java 8. Even though the Derby project has moved to read-only archive status, the binary archive remains permanently available and works reliably for local practice.</p><h3>Prerequisites</h3><ul><li>Java 8 (64-bit) installed in a space-free folder such as C:\Java\jdk8 (or referenced via its Windows 8.3 short path if inside Program Files), with JAVA_HOME set</li><li>Hadoop 3.3.6 installed and working, with HADOOP_HOME and winutils.exe configured</li><li>Apache Hive 4.0.1 (binary TAR.GZ)</li><li>Apache Derby 10.14.2.0 (binary ZIP)</li></ul><p>Downloads:</p><ul><li>Hive 4.0.1: <a href="https://archive.apache.org/dist/hive/hive-4.0.1/">https://archive.apache.org/dist/hive/hive-4.0.1/</a></li><li>Derby 10.14.2.0: <a href="https://archive.apache.org/dist/db/derby/db-derby-10.14.2.0/db-derby-10.14.2.0-bin.zip">https://archive.apache.org/dist/db/derby/db-derby-10.14.2.0/db-derby-10.14.2.0-bin.zip</a></li></ul><p>From the Hive link, download apache-hive-4.0.1-bin.tar.gz, not the source archive. For Derby, download the file ending in -bin.zip, not the source ZIP.</p><h3>Step 1: Confirm Hadoop is ready</h3><p>The Hive commands in this article are run in Command Prompt, not PowerShell, because the environment variable syntax is different. Open Command Prompt and run:</p><pre>java -version<br>hadoop version<br>echo %JAVA_HOME%<br>echo %HADOOP_HOME%</pre><p>Java should report a version starting with 1.8.0, Hadoop should report 3.3.6, and both variables should print their paths. If you are on a lab PC and another JDK version (such as JDK 17 or JDK 21) appears instead, move %JAVA_HOME%\bin above other Java entries in your User Path before continuing.</p><h3>Step 2: Extract Hive and Derby</h3><p>Create a space-free folder for both tools:</p><pre>mkdir C:\hivesetup</pre><p>Extract Hive:</p><pre>tar -xzf &quot;%USERPROFILE%\Downloads\apache-hive-4.0.1-bin.tar.gz&quot; -C &quot;C:\hivesetup&quot;</pre><p>Extract Derby:</p><pre>tar -xf &quot;%USERPROFILE%\Downloads\db-derby-10.14.2.0-bin.zip&quot; -C &quot;C:\hivesetup&quot;</pre><p>If the second command fails, right-click the ZIP file in File Explorer, choose Extract All, and select C:\hivesetup as the destination.</p><p>Verify:</p><pre>dir C:\hivesetup</pre><p>You should see these two folders:</p><ul><li>apache-hive-4.0.1-bin</li><li>db-derby-10.14.2.0-bin</li></ul><h3>Step 3: Copy the Derby driver into Hive</h3><p>Hive needs the Derby engine and JDBC driver on its classpath to use Derby as its metastore database. Copy the Derby JAR into Hive’s lib folder:</p><pre>copy &quot;C:\hivesetup\db-derby-10.14.2.0-bin\lib\derby.jar&quot; &quot;C:\hivesetup\apache-hive-4.0.1-bin\lib\&quot;</pre><p>Verify:</p><pre>dir &quot;C:\hivesetup\apache-hive-4.0.1-bin\lib\derby.jar&quot;</pre><p>If the file is listed, the driver is in place.</p><h3>Step 4: Set environment variables</h3><p>Hive needs one new variable, HIVE_HOME, and one new Path entry. JAVA_HOME and HADOOP_HOME already exist from the earlier articles. Always set these under User variables rather than System variables so the setup works even on restricted lab PCs. Use only one of the two options below.</p><h3>Option 1: Using PowerShell</h3><p>Open a PowerShell window and run the following. It adds the Hive entry to your existing User Path, skipping it if it already exists, and then creates HIVE_HOME:</p><pre>$key = Get-Item -Path &quot;HKCU:\Environment&quot;<br>$userPath = $key.GetValue(&quot;Path&quot;, &quot;&quot;, &quot;DoNotExpandEnvironmentNames&quot;)<br>foreach ($entry in @(&#39;%HIVE_HOME%\bin&#39;)) {<br>    if (($userPath -split &#39;;&#39;) -notcontains $entry) {<br>        $userPath = ($userPath.TrimEnd(&#39;;&#39;) + &#39;;&#39; + $entry).TrimStart(&#39;;&#39;)<br>    }<br>}<br>Set-ItemProperty -Path &quot;HKCU:\Environment&quot; -Name &quot;Path&quot; -Value $userPath -Type ExpandString<br>[Environment]::SetEnvironmentVariable(&quot;HIVE_HOME&quot;, &quot;C:\hivesetup\apache-hive-4.0.1-bin&quot;, &quot;User&quot;)</pre><p>This edits your existing Path in place rather than replacing it, so your other entries are preserved. The setx command is deliberately avoided for Path because it can silently cut a long value at 1,024 characters.</p><h3>Option 2: Using the Windows interface</h3><ol><li>Open Start and search for <strong>Edit environment variables for your account</strong>.</li><li>Under User variables, click <strong>New</strong>. Set Variable name to HIVE_HOME and Variable value to C:\hivesetup\apache-hive-4.0.1-bin.</li><li>Select the <strong>Path</strong> variable under User variables and click <strong>Edit</strong>.</li><li>Click <strong>New</strong> and add %HIVE_HOME%\bin.</li><li>Click <strong>OK</strong> in every dialog to save the changes.</li></ol><p>Close every open PowerShell and Command Prompt window, then open a new Command Prompt and verify:</p><pre>echo %HIVE_HOME%</pre><p>It should print C:\hivesetup\apache-hive-4.0.1-bin.</p><h3>Step 5: Create local temp folders and configure Hive</h3><p>Before creating Hive’s configuration file, create three space-free local directories for Hadoop and Hive temporary files and grant full permissions with winutils.exe. This prevents MapReduce shuffle crashes on Windows machines whose user profile path contains spaces.</p><p>In Command Prompt, run:</p><pre>mkdir C:\tmp\hadoop-data<br>mkdir C:\tmp\mapred-local<br>mkdir C:\hivesetup\scratch<br>&quot;%HADOOP_HOME%\bin\winutils.exe&quot; chmod -R 777 C:\tmp\hadoop-data<br>&quot;%HADOOP_HOME%\bin\winutils.exe&quot; chmod -R 777 C:\tmp\mapred-local<br>&quot;%HADOOP_HOME%\bin\winutils.exe&quot; chmod -R 777 C:\hivesetup\scratch</pre><p>Now open this folder in File Explorer:</p><pre>C:\hivesetup\apache-hive-4.0.1-bin\conf</pre><p>Right-click an empty area, choose New and then Text Document, and name it hive-site.xml. If Windows hides file extensions, turn them on first (View, then Show, then File name extensions), otherwise you will end up with hive-site.xml.txt. Open the file in Notepad and paste:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;configuration&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;javax.jdo.option.ConnectionURL&lt;/name&gt;<br>        &lt;value&gt;jdbc:derby:C:/hivesetup/metastore_db;create=true&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;javax.jdo.option.ConnectionDriverName&lt;/name&gt;<br>        &lt;value&gt;org.apache.derby.jdbc.EmbeddedDriver&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;hive.metastore.warehouse.dir&lt;/name&gt;<br>        &lt;value&gt;/user/hive/warehouse&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;hive.metastore.schema.verification&lt;/name&gt;<br>        &lt;value&gt;true&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;hive.execution.engine&lt;/name&gt;<br>        &lt;value&gt;mr&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;mapreduce.framework.name&lt;/name&gt;<br>        &lt;value&gt;local&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;hadoop.tmp.dir&lt;/name&gt;<br>        &lt;value&gt;C:/tmp/hadoop-data&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;mapreduce.cluster.local.dir&lt;/name&gt;<br>        &lt;value&gt;C:/tmp/mapred-local&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;hive.exec.scratchdir&lt;/name&gt;<br>        &lt;value&gt;/tmp/hive&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;hive.exec.local.scratchdir&lt;/name&gt;<br>        &lt;value&gt;C:/hivesetup/scratch&lt;/value&gt;<br>    &lt;/property&gt;<br>&lt;/configuration&gt;</pre><p>Save the file. Here is what the settings do:</p><ul><li>The connection URL tells Hive to keep its metastore in an embedded Derby database in C:/hivesetup/metastore_db. Derby creates this folder itself, so do not create it manually. Note the forward slashes.</li><li>The warehouse directory is the HDFS folder where table data is stored.</li><li>The execution engine is set to MapReduce (mr) with mapreduce.framework.name set to local. This runs MapReduce jobs reliably in-process on Windows without requiring Apache Tez or YARN container classpath overrides. Hive 4 prints a deprecation warning for MapReduce, which is harmless for a local learning setup.</li><li>The hadoop.tmp.dir, mapreduce.cluster.local.dir, and hive.exec.local.scratchdir properties force temporary shuffle and scratch files into space-free directories.</li></ul><h3>Step 6: Start Hadoop and create the warehouse directories</h3><p>Hive stores table data in HDFS, so Hadoop must be running. In Command Prompt, start HDFS and YARN:</p><pre>start-dfs.cmd<br>start-yarn.cmd</pre><p>Wait 5 to 10 seconds for the four separate daemon windows to finish initializing, then check running Java processes:</p><pre>jps</pre><p>You should see NameNode, DataNode, ResourceManager, and NodeManager in the list. Now create the directories Hive needs and set recursive permissions:</p><pre>hdfs dfs -mkdir -p /tmp/hive<br>hdfs dfs -mkdir -p /user/hive/warehouse<br>hdfs dfs -chmod -R 777 /tmp<br>hdfs dfs -chmod -R 777 /user/hive/warehouse</pre><p>Verify:</p><pre>hdfs dfs -ls /user/hive</pre><p>You should see the warehouse folder listed with drwxrwxrwx permissions.</p><blockquote><strong><em>Note:</em></strong><em> Permission 777 lets any local user read and write these folders. That is acceptable on a single-user learning machine, but do not use it on a shared or production cluster.</em></blockquote><h3>Step 7: Create the classpath and launcher scripts</h3><p>Because we start Hive’s Java classes directly, we have to tell Java where Hadoop’s libraries and configuration files live. Saving this in two small .cmd files avoids retyping long commands in every session.</p><p>First, open Notepad, paste the following as a single line, and save it as C:\hivesetup\hive-classpath.cmd (choose All Files as the file type so Notepad does not add .txt):</p><pre>set HADOOP_CP=%HADOOP_HOME%\etc\hadoop;%HADOOP_HOME%\share\hadoop\common\*;%HADOOP_HOME%\share\hadoop\common\lib\*;%HADOOP_HOME%\share\hadoop\hdfs\*;%HADOOP_HOME%\share\hadoop\hdfs\lib\*;%HADOOP_HOME%\share\hadoop\yarn\*;%HADOOP_HOME%\share\hadoop\yarn\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\*;%HADOOP_HOME%\share\hadoop\mapreduce\lib\*</pre><p>The first entry, etc\hadoop, matters: it puts your Hadoop configuration files, including core-site.xml, on Hive’s classpath so that Hive writes tables to HDFS instead of your local disk.</p><p>Next, create a one-command launcher script. If your Windows account name contains a space (such as First Last), Hadoop’s local MapReduce runner URL-encodes the space into %20 during shuffle operations and crashes with a FileNotFoundException for file.out.index. Setting a single-word HADOOP_USER_NAME inside a setlocal block fixes this cleanly without touching your Windows account or Hadoop config files.</p><p>Open Notepad, paste these five lines, and save the file as C:\hivesetup\start-hive.cmd (again choosing All Files):</p><pre>@echo off<br>setlocal<br>set HADOOP_USER_NAME=hiveuser<br>call C:\hivesetup\hive-classpath.cmd<br>&quot;%JAVA_HOME%\bin\java&quot; -Djline.terminal=jline.UnsupportedTerminal -cp &quot;%HIVE_HOME%\conf;%HIVE_HOME%\lib\*;%HADOOP_CP%&quot; org.apache.hadoop.hive.cli.CliDriver</pre><p>You can replace hiveuser with any single word without spaces. Because setlocal is included, HADOOP_USER_NAME and HADOOP_CP apply only while Hive is open and reset automatically when you exit.</p><h3>Step 8: Initialize the Hive metastore</h3><p>The metastore schema must be created once before Hive can be used. In Command Prompt, load the classpath and run HiveSchemaTool:</p><pre>set HADOOP_USER_NAME=hiveuser<br>call C:\hivesetup\hive-classpath.cmd<br>&quot;%JAVA_HOME%\bin\java&quot; -cp &quot;%HIVE_HOME%\conf;%HIVE_HOME%\lib\*;%HADOOP_CP%&quot; org.apache.hive.beeline.schematool.HiveSchemaTool -dbType derby -initSchema</pre><p>Wait for it to finish. A successful run creates the metastore_db folder in C:\hivesetup and ends with a message that schema initialization completed. Verify it:</p><pre>&quot;%JAVA_HOME%\bin\java&quot; -cp &quot;%HIVE_HOME%\conf;%HIVE_HOME%\lib\*;%HADOOP_CP%&quot; org.apache.hive.beeline.schematool.HiveSchemaTool -dbType derby -info</pre><p>This prints the metastore connection details and schema version.</p><blockquote><strong><em>Important:</em></strong><em> Run </em><em>-initSchema only once. Running it again on an existing metastore fails because the tables already exist. If you are working on a shared lab PC and an old </em><em>C:\hivesetup\metastore_db folder already exists, delete it before initializing fresh.</em></blockquote><h3>Step 9: Start the Hive CLI</h3><p>With Hadoop running, launch Hive using your script:</p><pre>C:\hivesetup\start-hive.cmd</pre><p>If Hive starts successfully, you will see the interactive Hive prompt:</p><pre>hive&gt;</pre><p>You may see SLF4J logging notices or a deprecation warning about the MapReduce engine before the prompt appears. Those are normal and do not indicate an error.</p><blockquote><strong><em>Note:</em></strong><em> Embedded Derby allows only one connection at a time. Keep a single Hive session open, and do not run HiveSchemaTool while the CLI is running.</em></blockquote><h3>Step 10: Test Hive with SQL</h3><p>Run these commands at the Hive prompt, one at a time. First, check the default database and create your own:</p><pre>SHOW DATABASES;<br>CREATE DATABASE testdb;<br>USE testdb;</pre><p>Create a table:</p><pre>CREATE TABLE students (<br>    id INT,<br>    name STRING,<br>    marks INT<br>);</pre><p>Insert some rows:</p><pre>INSERT INTO students VALUES<br>(1, &#39;Alice&#39;, 85),<br>(2, &#39;Bob&#39;, 90),<br>(3, &#39;Charlie&#39;, 78);</pre><p>Read them back and run an aggregate:</p><pre>SELECT * FROM students;<br>SELECT AVG(marks) FROM students;</pre><p>Because mapreduce.framework.name is set to local, the INSERT and AVG queries execute MapReduce in-process and complete in a few seconds (map = 100%, reduce = 100%). The SELECT query returns all three rows, and the average returns 84.33333333333333.</p><p>To leave the Hive prompt cleanly, type:</p><pre>exit;</pre><h3>Step 11: Check the data in HDFS</h3><p>In Command Prompt, confirm that Hive wrote your table data to HDFS and not to local disk:</p><pre>hdfs dfs -ls -R /user/hive/warehouse</pre><p>You should see the testdb.db folder with the students table and its data file inside it. You can also browse the same directories in the NameNode web interface at <a href="http://localhost:9870/">http://localhost:9870</a>.</p><h3>Stop everything</h3><p>Always exit the Hive prompt first so embedded Derby releases its database lock, then stop YARN and HDFS:</p><pre>stop-yarn.cmd<br>stop-dfs.cmd</pre><p>Run jps to confirm that only Jps remains.</p><h3>Common issues</h3><ul><li><strong>FileNotFoundException pointing to localRunner with </strong><strong>%20 and </strong><strong>file.out.index during INSERT or AVG:</strong> Your Windows username has a space, which Hadoop URL-encodes during local shuffles. Make sure hive-site.xml points to the space-free temp directories from Step 5 and launch Hive through start-hive.cmd with a single-word HADOOP_USER_NAME.</li><li><strong>AccessControlException Permission denied on </strong><strong>/tmp/hive/resultscache:</strong> HDFS /tmp was created earlier with restrictive permissions under your Windows username. Run hdfs dfs -chmod -R 777 /tmp and hdfs dfs -chmod -R 777 /user/hive/warehouse using your original Windows account, then relaunch Hive.</li><li><strong>Connection refused on </strong><strong>localhost:9000:</strong> HDFS is not running yet. Run start-dfs.cmd, wait 10 seconds, verify NameNode and DataNode with jps, and launch Hive again.</li><li><strong>Hive cannot find its configuration or fails to parse XML:</strong> Check that the file is named hive-site.xml (not hive-site.xml.txt) and has only a single XML declaration header at the top.</li><li><strong>Derby reports that another instance may have booted the database:</strong> A second Hive CLI or schema tool session is open. Close it and try again.</li><li><strong>Commands fail with an unknown variable or </strong><strong>ClassNotFoundException:</strong> You ran the Java command in a new window without loading hive-classpath.cmd. Use C:\hivesetup\start-hive.cmd so the classpath loads automatically.</li><li><strong>The schema tool says tables already exist:</strong> The metastore is already initialized. Skip Step 8 and go straight to Step 9.</li></ul><h3>Wrapping up</h3><p>You now have Apache Hive 4.0.1 running on Windows 11 on top of Hadoop 3.3.6 and Java 8, with an embedded Derby metastore, table data stored in your local HDFS, and a single-command launcher ready for future sessions. Together with the Hadoop and Spark articles in this series, that gives you a complete local Big Data environment to practice on.</p><p>From here you can load larger CSV datasets into HDFS, create external tables over them, and compare how the same data behaves in Hive and in Spark.</p><p>If this saved you debugging time, give it a clap and report any bugs you find in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82536d5bf152" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Install Apache Hive 4.0.1 on Windows 11 with Hadoop 3.3.6: Step-by-Step Setup]]></title>
            <link>https://medium.com/@basupatil09/how-to-install-apache-hive-4-0-1-on-windows-11-with-hadoop-3-3-6-step-by-step-setup-ac8326950355?source=rss-e69366202760------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac8326950355</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[hive]]></category>
            <category><![CDATA[apache-hive]]></category>
            <dc:creator><![CDATA[Basu Patil]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 18:09:37 GMT</pubDate>
            <atom:updated>2026-11-25T13:53:52.143Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Run SQL queries on your local HDFS from a Windows 11 laptop, without Linux, WSL or Docker.</em></p><p>Hive lets you query data stored in Hadoop using SQL. It is a core tool in the Hadoop ecosystem, and it is also the one that is hardest to get running on Windows.</p><p>This tutorial walks you through installing Apache Hive 4.0.1 on Windows 11 on top of the Hadoop 3.3.6 setup from the first article in this series. Hive stores its table definitions in a metastore database, and for a single-user learning setup we use Apache Derby in embedded mode. Everything is configured by hand: you edit files in Notepad, and commands are used to extract archives, create folders, initialize the metastore and start Hive.</p><blockquote>Note: This setup is intended for a local learning environment. Hive is not officially supported on Windows: the Apache installation guide covers Linux and Mac, and the binary package does not include a ready-to-use Windows launcher. Instead of the usual hive command, this tutorial starts Hive’s Java classes directly. It assumes you have completed the Hadoop 3.3.6 setup from the first article, including Java 8, HADOOP_HOME and the winutils files.</blockquote><h3>Why Hive 4.0.1?</h3><p>The Hive downloads page lists the 4.0.x releases as working with Hadoop 3.3.6. Hive 4.1 and later list Hadoop 3.4.1 instead, and Hive 4.2 requires JDK 21 as a minimum. The 3.x line has reached end of life. Hive 4.0.1 is the release that matches the Hadoop 3.3.6 and Java 8 setup used throughout this series.</p><p>For the metastore we use Apache Derby 10.14.2.0, the last Derby line that runs on Java 8.</p><h3>Prerequisites</h3><ul><li>Java 8 (64-bit) installed at C:\Java\jdk8, with JAVA_HOME set</li><li>Hadoop 3.3.6 installed and working, with HADOOP_HOME set</li><li>Apache Hive 4.0.1 (binary)</li><li>Apache Derby 10.14.2.0 (binary ZIP)</li></ul><p>Downloads:</p><ul><li>Hive 4.0.1: <a href="https://archive.apache.org/dist/hive/hive-4.0.1/">https://archive.apache.org/dist/hive/hive-4.0.1/</a></li><li>Derby 10.14.2.0: <a href="https://archive.apache.org/dist/db/derby/db-derby-10.14.2.0/db-derby-10.14.2.0-bin.zip">https://archive.apache.org/dist/db/derby/db-derby-10.14.2.0/db-derby-10.14.2.0-bin.zip</a></li></ul><p>From the Hive link, download <strong>apache-hive-4.0.1-bin.tar.gz</strong>, not the source archive. For Derby, download the file ending in <strong>-bin.zip</strong>, not the source ZIP.</p><h3>Step 1: Confirm Hadoop is ready</h3><p>The Hive commands in this article are run in <strong>Command Prompt</strong>, not PowerShell, because the variable syntax is different. Open Command Prompt and run:</p><pre>java -version<br>hadoop version<br>echo %JAVA_HOME%<br>echo %HADOOP_HOME%</pre><p>Java should report a version starting with 1.8.0, Hadoop should report 3.3.6, and both variables should print their paths. If any of these fail, complete the Hadoop article first.</p><h3>Step 2: Extract Hive and Derby</h3><p>Create a folder for both tools:</p><pre>mkdir C:\hivesetup</pre><p>Extract Hive:</p><pre>tar -xzf &quot;%USERPROFILE%\Downloads\apache-hive-4.0.1-bin.tar.gz&quot; -C &quot;C:\hivesetup&quot;</pre><p>Extract Derby:</p><pre>tar -xf &quot;%USERPROFILE%\Downloads\db-derby-10.14.2.0-bin.zip&quot; -C &quot;C:\hivesetup&quot;</pre><p>If the second command fails, right-click the ZIP file in File Explorer, choose <strong>Extract All</strong> and select C:\hivesetup as the destination.</p><p>Verify:</p><pre>dir C:\hivesetup</pre><p>You should see these two folders:</p><pre>apache-hive-4.0.1-bin<br>db-derby-10.14.2.0-bin</pre><h3>Step 3: Copy the Derby driver into Hive</h3><p>Hive needs the Derby engine and JDBC driver on its classpath to use Derby as its metastore database. Copy the Derby JAR into Hive’s lib folder:</p><pre>copy &quot;C:\hivesetup\db-derby-10.14.2.0-bin\lib\derby.jar&quot; &quot;C:\hivesetup\apache-hive-4.0.1-bin\lib\&quot;</pre><p>Verify:</p><pre>dir &quot;C:\hivesetup\apache-hive-4.0.1-bin\lib\derby.jar&quot;</pre><p>If the file is listed, the driver is in place.</p><h3>Step 4: Set environment variables</h3><p>Hive needs one new variable, HIVE_HOME, and one new Path entry. JAVA_HOME and HADOOP_HOME already exist from the earlier articles. You can set the new ones with PowerShell or through the Windows interface. Use only one of the two options.</p><h3>Option 1: Using PowerShell</h3><p>Open a PowerShell window and run the following. It adds the Hive entry to your existing user Path, skipping it if it already exists, and then creates HIVE_HOME:</p><pre>$key = Get-Item -Path &quot;HKCU:\Environment&quot;<br>$userPath = $key.GetValue(&quot;Path&quot;, &quot;&quot;, &quot;DoNotExpandEnvironmentNames&quot;)<br>foreach ($entry in @(&#39;%HIVE_HOME%\bin&#39;)) {<br>    if (($userPath -split &#39;;&#39;) -notcontains $entry) {<br>        $userPath = ($userPath.TrimEnd(&#39;;&#39;) + &#39;;&#39; + $entry).TrimStart(&#39;;&#39;)<br>    }<br>}<br>Set-ItemProperty -Path &quot;HKCU:\Environment&quot; -Name &quot;Path&quot; -Value $userPath -Type ExpandString<br>[Environment]::SetEnvironmentVariable(&quot;HIVE_HOME&quot;, &quot;C:\hivesetup\apache-hive-4.0.1-bin&quot;, &quot;User&quot;)</pre><p>This edits your existing Path in place rather than replacing it, so your other entries are preserved. The setx command is deliberately avoided, because it can silently cut a long Path value at 1,024 characters.</p><h3>Option 2: Using the Windows interface</h3><ol><li>Open Start and search for <strong>Edit environment variables for your account</strong>.</li><li>Under <strong>User variables</strong>, click <strong>New</strong>. Variable name: <strong>HIVE_HOME</strong>. Variable value: <strong>C:\hivesetup\apache-hive-4.0.1-bin</strong></li><li>Select the <strong>Path</strong> variable under User variables and click <strong>Edit</strong>.</li><li>Click <strong>New</strong> and add this entry: <strong>%HIVE_HOME%\bin</strong></li><li>Click <strong>OK</strong> in every dialog to save the changes.</li></ol><p>Close every open PowerShell and Command Prompt window, then open a new Command Prompt and verify:</p><pre>echo %HIVE_HOME%</pre><p>It should print C:\hivesetup\apache-hive-4.0.1-bin.</p><h3>Step 5: Configure Hive</h3><p>Open this folder in File Explorer:</p><pre>C:\hivesetup\apache-hive-4.0.1-bin\conf</pre><p>Right-click an empty area, choose <strong>New</strong> and then <strong>Text Document</strong>, and name it <strong>hive-site.xml</strong>. If Windows hides file extensions, turn them on first (<strong>View</strong>, then <strong>Show</strong>, then <strong>File name extensions</strong>), otherwise you will end up with hive-site.xml.txt. Open the file in Notepad and paste:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;configuration&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;configuration&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;javax.jdo.option.ConnectionURL&lt;/name&gt;<br>        &lt;value&gt;jdbc:derby:C:/hivesetup/metastore_db;create=true&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;javax.jdo.option.ConnectionDriverName&lt;/name&gt;<br>        &lt;value&gt;org.apache.derby.jdbc.EmbeddedDriver&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;hive.metastore.warehouse.dir&lt;/name&gt;<br>        &lt;value&gt;/user/hive/warehouse&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;hive.metastore.schema.verification&lt;/name&gt;<br>        &lt;value&gt;true&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;hive.execution.engine&lt;/name&gt;<br>        &lt;value&gt;mr&lt;/value&gt;<br>    &lt;/property&gt;<br>&lt;/configuration&gt;</pre><p>Save the file. Here is what the settings do:</p><ul><li>The connection URL tells Hive to keep its metastore in an embedded Derby database in C:/hivesetup/metastore_db. Derby creates this folder itself, so do not create it manually. Note the forward slashes.</li><li>The warehouse directory is the HDFS folder where table data is stored.</li><li>The execution engine is set to MapReduce because Tez is not installed in this series. Hive 4 treats MapReduce as deprecated, which is fine for a learning setup.</li></ul><h3>Step 6: Start Hadoop and create the warehouse directories</h3><p>Hive stores table data in HDFS, so Hadoop must be running. In Command Prompt, start HDFS and YARN:</p><pre>start-dfs.cmd<br>start-yarn.cmd<br>jps</pre><p>You should see NameNode, DataNode, ResourceManager and NodeManager in the list. Now create the directories Hive needs and set their permissions:</p><pre>hdfs dfs -mkdir -p /tmp<br>hdfs dfs -mkdir -p /user/hive/warehouse<br>hdfs dfs -chmod 777 /tmp<br>hdfs dfs -chmod 777 /user/hive/warehouse</pre><p>Verify:</p><pre>hdfs dfs -ls /user/hive</pre><p>You should see the warehouse folder listed.</p><blockquote>Note: Permission 777 lets any user read and write these folders. That is acceptable on a single-user learning machine, but do not copy it to a shared or production cluster.</blockquote><h3>Step 7: Prepare the Hadoop classpath</h3><p>Because we start Hive’s Java classes directly, we have to tell Java where the Hadoop libraries and configuration files are. The classpath is long, so save it in a small file that you can run in every new window. Open Notepad, paste the following as a single line, and save it as <strong>C:\hivesetup\hive-classpath.cmd</strong> (choose <strong>All files</strong> as the file type so Notepad does not add .txt):</p><pre>set HADOOP_CP=%HADOOP_HOME%\etc\hadoop;%HADOOP_HOME%\share\hadoop\common\*;%HADOOP_HOME%\share\hadoop\common\lib\*;%HADOOP_HOME%\share\hadoop\hdfs\*;%HADOOP_HOME%\share\hadoop\hdfs\lib\*;%HADOOP_HOME%\share\hadoop\yarn\*;%HADOOP_HOME%\share\hadoop\yarn\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\*;%HADOOP_HOME%\share\hadoop\mapreduce\lib\*</pre><p>The first entry, etc\hadoop, matters: it puts the Hadoop configuration files, including core-site.xml, on Hive’s classpath so that Hive uses your HDFS and YARN instead of the local disk.</p><p>In Command Prompt, load the classpath:</p><pre>call C:\hivesetup\hive-classpath.cmd<br>echo %HADOOP_CP%</pre><p>The variable only lasts for that window, so repeat the call command in every new Command Prompt before running a Hive command.</p><h3>Step 8: Initialize the Hive metastore</h3><p>The metastore schema must be created once before Hive can be used. With the classpath loaded, run:</p><pre>&quot;%JAVA_HOME%\bin\java&quot; -cp &quot;%HIVE_HOME%\conf;%HIVE_HOME%\lib\*;%HADOOP_CP%&quot; org.apache.hive.beeline.schematool.HiveSchemaTool -dbType derby -initSchema</pre><p>Wait for it to finish. A successful run creates the metastore_db folder in C:\hivesetup and ends with a message that schema initialization completed. Verify it:</p><pre>&quot;%JAVA_HOME%\bin\java&quot; -cp &quot;%HIVE_HOME%\conf;%HIVE_HOME%\lib\*;%HADOOP_CP%&quot; org.apache.hive.beeline.schematool.HiveSchemaTool -dbType derby -info</pre><p>This should print the metastore connection details and the schema version.</p><blockquote>Important: Run -initSchema only once. Running it again on an existing metastore fails because the tables already exist.</blockquote><h3>Step 9: Start the Hive CLI</h3><p>In the same Command Prompt window, run:</p><pre>&quot;%JAVA_HOME%\bin\java&quot; -Djline.terminal=jline.UnsupportedTerminal -cp &quot;%HIVE_HOME%\conf;%HIVE_HOME%\lib\*;%HADOOP_CP%&quot; org.apache.hadoop.hive.cli.CliDriver</pre><p>If Hive starts successfully, you will see the Hive prompt:</p><pre>hive&gt;</pre><p>You may see warnings about logging or about the MapReduce engine before the prompt appears. Those alone do not mean something is wrong.</p><blockquote>Note: Embedded Derby allows only one connection at a time. Keep a single Hive session open, and do not run the schema tool while the CLI is running.</blockquote><h3>Step 10: Test Hive with SQL</h3><p>Run these commands at the Hive prompt, one at a time. First, check the default database and create your own:</p><pre>SHOW DATABASES;<br>CREATE DATABASE testdb;<br>USE testdb;</pre><p>Create a table:</p><pre>CREATE TABLE students (<br>    id INT,<br>    name STRING,<br>    marks INT<br>);</pre><p>Insert some rows:</p><pre>INSERT INTO students VALUES<br>(1, &#39;Alice&#39;, 85),<br>(2, &#39;Bob&#39;, 90),<br>(3, &#39;Charlie&#39;, 78);</pre><p>Read them back and run an aggregate:</p><pre>SELECT * FROM students;<br>SELECT AVG(marks) FROM students;</pre><p>The SELECT should return the three rows, and the average should be about 84.33. The INSERT and the AVG query are the two that launch jobs on YARN, so they take noticeably longer than the other commands. If a job fails, open the YARN ResourceManager at <a href="http://localhost:8088/">http://localhost:8088</a> to check that the NodeManager is running and to read the failed application’s logs.</p><p>To leave the Hive prompt, type:</p><pre>exit;</pre><h3>Step 11: Check the data in HDFS</h3><p>In a second Command Prompt window, confirm that Hive wrote the table to HDFS and not to your local disk:</p><pre>hdfs dfs -ls -R /user/hive/warehouse</pre><p>You should see the testdb.db folder with the students table inside it. You can also browse the same folders in the NameNode web interface at <a href="http://localhost:9870/">http://localhost:9870</a>.</p><h3>Stop everything</h3><p>Exit the Hive prompt first, then stop YARN and HDFS:</p><pre>stop-yarn.cmd<br>stop-dfs.cmd</pre><h3>Common issues</h3><ul><li><strong>Hive cannot find its configuration:</strong> check that the file is really named hive-site.xml and not hive-site.xml.txt.</li><li><strong>Derby reports that another instance may have booted the database:</strong> a second Hive or schema tool session is open. Close it and try again.</li><li><strong>Commands fail with an unknown variable or missing class:</strong> you probably opened a new window and did not run the classpath file with call first.</li><li><strong>The schema tool says tables already exist:</strong> the metastore is already initialized. Skip Step 8.</li></ul><h3>In Conclusion</h3><p>You now have Apache Hive 4.0.1 running on Windows 11 on top of Hadoop 3.3.6 and Java 8, with an embedded Derby metastore and table data stored in your local HDFS. Together with the Hadoop and Spark articles in this series, that gives you a complete local Big Data environment to practice on.</p><p>From here you can load larger datasets into HDFS, create external tables over them, and compare how the same data behaves in Hive and in Spark.</p><p>If this saved you debugging time, give it a clap and report any bugs you find in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac8326950355" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Install Apache Spark 3.5.9 on Windows 11 with Hadoop 3.3.6: Step-by-Step Setup]]></title>
            <link>https://medium.com/@basupatil09/how-to-install-apache-spark-3-5-9-on-windows-11-with-hadoop-3-3-6-step-by-step-setup-f317c13e3efe?source=rss-e69366202760------2</link>
            <guid isPermaLink="false">https://medium.com/p/f317c13e3efe</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[apache-spark-on-windows]]></category>
            <dc:creator><![CDATA[Basu Patil]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 15:06:02 GMT</pubDate>
            <atom:updated>2026-11-24T15:06:02.060Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Run Spark on your Windows 11 laptop and read data straight from your local HDFS, without installing a virtual machine.</em></p><p>Once Hadoop is running, Spark is the natural next tool to learn. It is the engine most people use to process data stored in HDFS, and it runs on Windows with the same support files you already installed for Hadoop.</p><p>This tutorial walks you through installing Apache Spark 3.5.9 on Windows 11, running it in local mode, and reading a file from the HDFS cluster you built in the previous article. The setup is done by hand: you set environment variables with a few PowerShell commands (or through the Windows dialog, if you prefer), and commands are also used to extract the archive, create folders, and verify each step.</p><blockquote>Note: This setup is intended for a local learning environment. It assumes you have already completed the Hadoop 3.3.6 setup from the previous article, including Java 8, the HADOOP_HOME variable, and the winutils.exe and hadoop.dll files. Spark on Windows depends on them.</blockquote><h3>Why Spark 3.5.9 and not Spark 4?</h3><p>The Spark 3.5 line runs on Java 8, 11 and 17. Newer Spark releases require Java 17 or later, which would break the Java 8 setup used for Hadoop 3.3.6 in this series. Spark 3.5.9 lets you keep a single Java 8 installation for everything.</p><h3>Prerequisites</h3><ul><li>Java 8 (64-bit) installed at C:\Java\jdk8, with JAVA_HOME set</li><li>Hadoop 3.3.6 installed, with HADOOP_HOME set and winutils.exe and hadoop.dll in its bin folder</li><li>Apache Spark 3.5.9, pre-built for Hadoop 3</li><li>7-Zip (optional)</li></ul><p>Downloads:</p><ul><li>Spark 3.5.9: <a href="https://spark.apache.org/downloads.html">https://spark.apache.org/downloads.html</a></li><li>Spark 3.5.9 file list: <a href="https://release-catalog.apache.org/spark/3.5.9/index.html">https://release-catalog.apache.org/spark/3.5.9/index.html</a></li><li>7-Zip: <a href="https://www.7-zip.org/download.html">https://www.7-zip.org/download.html</a></li></ul><p>On the Spark downloads page, select Spark release <strong>3.5.9</strong> and the package type <strong>Pre-built for Apache Hadoop 3.3 and later</strong>. The file you need is <strong>spark-3.5.9-bin-hadoop3.tgz</strong>. Do not choose the source, the Scala 2.13 or the “without Hadoop” packages.</p><h3>Step 1: Confirm Java and Hadoop are ready</h3><p>Open a new PowerShell window and run:</p><pre>java -version<br>hadoop version<br>echo $env:JAVA_HOME<br>echo $env:HADOOP_HOME</pre><p>Java should report a version starting with 1.8.0, Hadoop should report 3.3.6, and both variables should print their paths. If any of these fail, complete the Hadoop article first.</p><p>Spark’s Windows scripts, like Hadoop’s, can fail when a path contains spaces. This is why Java is installed at C:\Java\jdk8 and why Spark is installed into a path without spaces in the next step.</p><h3>Step 2: Extract Spark</h3><p>Create a folder for Spark. Open PowerShell and run:</p><pre>New-Item -ItemType Directory -Force -Path &quot;C:\sparksetup&quot;</pre><p>Extract the downloaded archive:</p><pre>tar -xzf &quot;$env:USERPROFILE\Downloads\spark-3.5.9-bin-hadoop3.tgz&quot; -C &quot;C:\sparksetup&quot;</pre><p>The extracted folder should be:</p><pre>C:\sparksetup\spark-3.5.9-bin-hadoop3</pre><p>Verify:</p><pre>dir C:\sparksetup\spark-3.5.9-bin-hadoop3</pre><p>You should see folders such as bin, conf, jars and python.</p><p>If you use 7-Zip instead, extract the .tgz file into a .tar file first, then extract the .tar file into C:\sparksetup.</p><h3>Step 3: Set environment variables</h3><p>Spark needs one new variable, SPARK_HOME, and one new Path entry. JAVA_HOME and HADOOP_HOME were already created in the Hadoop article. You can set the new ones with PowerShell or through the Windows interface. Use only one of the two options.</p><h3>Option 1: Using PowerShell</h3><p>Open a PowerShell window and run the following. It adds the Spark entry to your existing user Path, skipping it if it already exists, and then creates SPARK_HOME:</p><pre>$key = Get-Item -Path &quot;HKCU:\Environment&quot;<br>$userPath = $key.GetValue(&quot;Path&quot;, &quot;&quot;, &quot;DoNotExpandEnvironmentNames&quot;)<br>foreach ($entry in @(&#39;%SPARK_HOME%\bin&#39;)) {<br>    if (($userPath -split &#39;;&#39;) -notcontains $entry) {<br>        $userPath = ($userPath.TrimEnd(&#39;;&#39;) + &#39;;&#39; + $entry).TrimStart(&#39;;&#39;)<br>    }<br>}<br>Set-ItemProperty -Path &quot;HKCU:\Environment&quot; -Name &quot;Path&quot; -Value $userPath -Type ExpandString<br>[Environment]::SetEnvironmentVariable(&quot;SPARK_HOME&quot;, &quot;C:\sparksetup\spark-3.5.9-bin-hadoop3&quot;, &quot;User&quot;)</pre><p>This edits your existing Path in place rather than replacing it, so your other entries are preserved. The setx command is deliberately avoided, because it can silently cut a long Path value at 1,024 characters.</p><p>Now close all existing PowerShell windows and open a new one. Windows that were already open keep the old variables.</p><h3>Option 2: Using the Windows interface</h3><ol><li>Open Start and search for <strong>Edit environment variables for your account</strong>.</li><li>Under <strong>User variables</strong>, click <strong>New</strong>. Variable name: <strong>SPARK_HOME</strong>. Variable value: <strong>C:\sparksetup\spark-3.5.9-bin-hadoop3</strong></li><li>Select the <strong>Path</strong> variable under User variables and click <strong>Edit</strong>.</li><li>Click <strong>New</strong> and add this entry: <strong>%SPARK_HOME%\bin</strong></li><li>Click <strong>OK</strong> in every dialog to save the changes.</li><li>Close all existing PowerShell windows and open a new one.</li></ol><p>Verify in the new window:</p><pre>echo $env:SPARK_HOME<br>spark-submit --version</pre><p>The first command should print your Spark path. The second should display the Spark banner reporting version 3.5.9.</p><h3>Step 4: Run Spark in local mode</h3><p>Spark’s local mode runs everything inside one process on your machine, which is the simplest way to confirm the installation works. No configuration files need to be edited for this. Start the Spark shell:</p><pre>spark-shell</pre><p>After a short startup, you should see the Spark banner and a <em>scala&gt;</em> prompt. At the prompt, run:</p><pre>spark.version<br>sc.master<br>spark.range(1000).count()</pre><p>The expected results are the version 3.5.9, the master local[*], and a count of 1000.</p><p>While the shell is open, the Spark web interface is available at:</p><p><a href="http://localhost:4040/">http://localhost:4040</a></p><p>Leave the shell open for the next step. When you are done, type <em>:quit</em> to exit.</p><blockquote>Note: When the shell closes on Windows, you may see a warning about Spark failing to delete a temporary directory. This is a well-known Windows file-locking quirk. It does not affect your results.</blockquote><h3>Step 5: Read a file from HDFS</h3><p>Now connect Spark to the Hadoop cluster from the previous article. Quit the Spark shell if it is still open, then start the Hadoop services in PowerShell:</p><pre>start-dfs.cmd<br>jps</pre><p>You should see NameNode and DataNode in the list. Now create a small sample file and upload it to HDFS:</p><pre>Set-Content -Path &quot;$env:USERPROFILE\sample.txt&quot; -Value &quot;hello spark&quot;,&quot;hello hadoop&quot;,&quot;hello world&quot;<br>hdfs dfs -mkdir /sparktest<br>hdfs dfs -put &quot;$env:USERPROFILE\sample.txt&quot; /sparktest/<br>hdfs dfs -ls /sparktest</pre><p>The last command should list sample.txt inside /sparktest. Start the Spark shell again:</p><pre>spark-shell</pre><p>At the scala&gt; prompt, read the file from HDFS and count the words:</p><pre>val lines = spark.read.textFile(&quot;hdfs://localhost:9000/sparktest/sample.txt&quot;)<br>lines.count()<br>lines.flatMap(_.split(&quot; &quot;)).groupBy(&quot;value&quot;).count().show()</pre><p>The line count should be 3, and the word count table should show the word “hello” appearing 3 times, with “spark”, “hadoop” and “world” once each. The order of the rows may differ.</p><p>The address hdfs://localhost:9000 is the fs.defaultFS value you configured in core-site.xml in the Hadoop article. If your Hadoop setup uses a different port, use that one here.</p><p>Open the NameNode web interface at <a href="http://localhost:9870/">http://localhost:9870</a>, choose <strong>Utilities</strong> and then <strong>Browse the file system</strong>, to confirm the /sparktest folder and the sample.txt file are there.</p><h3>Step 6: Stop everything</h3><p>Exit the Spark shell by typing:</p><pre>:quit</pre><p>Then stop the Hadoop services. If you also started YARN, stop it first:</p><pre>stop-yarn.cmd<br>stop-dfs.cmd</pre><h3>In Conclusion</h3><p>You now have Apache Spark 3.5.9 running on Windows 11 alongside Hadoop 3.3.6, on a single Java 8 installation, with Spark able to read data from your local HDFS.</p><p>From here you can explore Spark SQL and DataFrames, write larger jobs against HDFS, and move on to the next article in this series, where we set up Apache Hive.</p><p>If this saved you debugging time, give it a clap and report any bugs you find in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f317c13e3efe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Install Apache Hadoop 3.3.6 on Windows 11: Step-by-Step Single-Node Setup]]></title>
            <link>https://medium.com/@basupatil09/how-to-install-apache-hadoop-3-3-6-on-windows-11-step-by-step-single-node-setup-853e8fbf3914?source=rss-e69366202760------2</link>
            <guid isPermaLink="false">https://medium.com/p/853e8fbf3914</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[big-data-analytics]]></category>
            <category><![CDATA[apache-hadoop]]></category>
            <dc:creator><![CDATA[Basu Patil]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 15:00:12 GMT</pubDate>
            <atom:updated>2026-11-24T15:00:12.443Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Run HDFS and YARN on your Windows 11 laptop without installing a virtual machine.</em></p><p>If you’re learning Big Data, you’ll eventually need a Hadoop environment to practice with. Most tutorials assume Linux, but you can also run Hadoop on Windows 11 with a few additional components.</p><p>This tutorial walks you through installing Apache Hadoop 3.3.6 with Java 8 and configuring HDFS and YARN on a single Windows machine. Everything is configured by hand: you set environment variables through the Windows dialog and edit configuration files in Notepad. Commands are used only to extract the archive, create the HDFS folders, format HDFS, start and stop the services, and verify each step.</p><blockquote>Note: This setup is intended for a local learning environment. The winutils.exe and hadoop.dll files used in this tutorial are unofficial community-built binaries. This tutorial uses the binaries built for Hadoop 3.3.6, which match the Hadoop version exactly.</blockquote><h3>Prerequisites</h3><ul><li>JDK 8 (64-bit)</li><li>Apache Hadoop 3.3.6</li><li>7-Zip (optional)</li><li>winutils.exe and hadoop.dll</li></ul><p>Downloads:</p><ul><li>JDK 8: <a href="https://adoptium.net/temurin/releases/?version=8">https://adoptium.net/temurin/releases/?version=8</a></li><li>7-Zip: <a href="https://www.7-zip.org/download.html">https://www.7-zip.org/download.html</a></li><li>Hadoop 3.3.6: <a href="https://apache.org/dist/hadoop/core/hadoop-3.3.6/">https://apache.org/dist/hadoop/core/hadoop-3.3.6/</a></li><li>Windows binaries: <a href="https://github.com/cdarlint/winutils">https://github.com/cdarlint/winutils</a></li></ul><p>From the Hadoop link, download <strong>hadoop-3.3.6.tar.gz</strong> (the file of about 696 MB, not the aarch64, site or src archives).</p><p>For the Windows support binaries, open the <strong>hadoop-3.3.6/bin</strong> folder in the cdarlint/winutils repository and download <strong>winutils.exe</strong> and <strong>hadoop.dll</strong>.</p><h3>Step 1: Install Java 8</h3><p>Run the Eclipse Temurin JDK 8 (64-bit) installer. When the installer asks for the installation location, change it to a path without spaces:</p><pre>C:\Java\jdk8</pre><p>Hadoop’s Windows scripts can run into problems when JAVA_HOME contains spaces, such as the default <em>Program Files</em> folder. Installing Java into a path without spaces avoids the problem entirely, so no short-path workaround is needed.</p><p>Leave the installer’s own “Set JAVA_HOME variable” option turned off. You will set the variable yourself in Step 4.</p><p>Verify the installation by opening a new PowerShell window and running:</p><pre>java -version<br>javac -version</pre><p>Both commands should report a Java version starting with 1.8.0.</p><h3>Step 2: Extract Hadoop</h3><p>In File Explorer, create a folder named <strong>hadoopsetup</strong> inside the C drive, so the path is C:\hadoopsetup.</p><p>Open PowerShell and extract the downloaded archive:</p><pre>tar -xzf &quot;$env:USERPROFILE\Downloads\hadoop-3.3.6.tar.gz&quot; -C &quot;C:\hadoopsetup&quot;</pre><p>The extracted folder should be:</p><pre>C:\hadoopsetup\hadoop-3.3.6</pre><p>Verify:</p><pre>dir C:\hadoopsetup\hadoop-3.3.6</pre><p>You should see folders such as bin, etc, sbin and share.</p><p>If you use 7-Zip instead, extract the .tar.gz file into a .tar file first, then extract the .tar file into C:\hadoopsetup.</p><h3>Step 3: Add the Windows support binaries</h3><p>Copy the two files you downloaded, winutils.exe and hadoop.dll, into the Hadoop bin folder using File Explorer:</p><pre>C:\hadoopsetup\hadoop-3.3.6\bin</pre><p>Confirm that both files are now listed in that folder alongside the existing hadoop and hdfs scripts.</p><h3>Step 4: Set environment variables</h3><p>This step is done entirely through the Windows interface.</p><ol><li>Open Start and search for <strong>Edit environment variables for your account</strong>.</li><li>Under <strong>User variables</strong>, click <strong>New</strong> and create the first variable. Variable name: <strong>JAVA_HOME</strong>. Variable value: <strong>C:\Java\jdk8</strong></li><li>Click <strong>New</strong> again and create the second variable. Variable name: <strong>HADOOP_HOME</strong>. Variable value: <strong>C:\hadoopsetup\hadoop-3.3.6</strong></li><li>Select the <strong>Path</strong> variable under User variables and click <strong>Edit</strong>.</li><li>Click <strong>New</strong> and add these three entries, one at a time as separate lines: <strong>%JAVA_HOME%\bin</strong>, <strong>%HADOOP_HOME%\bin</strong> and <strong>%HADOOP_HOME%\sbin</strong></li><li>Click <strong>OK</strong> in every dialog to save the changes.</li><li>Close all existing PowerShell windows and open a new one. Windows that were already open keep the old variables.</li></ol><p>If you installed Java somewhere else, use your actual path for JAVA_HOME.</p><p>Verify:</p><pre>echo $env:JAVA_HOME<br>echo $env:HADOOP_HOME<br>java -version<br>hadoop version</pre><p>The first two commands should print the paths you set, and hadoop version should display Hadoop 3.3.6.</p><h3>Step 5: Configure Hadoop</h3><p>Open this folder in File Explorer:</p><pre>C:\hadoopsetup\hadoop-3.3.6\etc\hadoop</pre><p>For each file below, right-click it, choose <strong>Open with</strong>, select <strong>Notepad</strong>, make the change and save.</p><h3>5.1 hadoop-env.cmd</h3><p>Find the existing line that begins with <em>set JAVA_HOME=</em> and replace it with:</p><pre>set JAVA_HOME=C:\Java\jdk8</pre><p>Use the same Java path you configured in Step 4.</p><h3>5.2 core-site.xml</h3><p>Replace the empty configuration block with:</p><pre>&lt;configuration&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;fs.defaultFS&lt;/name&gt;<br>        &lt;value&gt;hdfs://localhost:9000&lt;/value&gt;<br>    &lt;/property&gt;<br>&lt;/configuration&gt;</pre><h3>5.3 hdfs-site.xml</h3><pre>&lt;configuration&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;dfs.replication&lt;/name&gt;<br>        &lt;value&gt;1&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;dfs.namenode.name.dir&lt;/name&gt;<br>        &lt;value&gt;file:///C:/hadoopsetup/hadoop-3.3.6/data/dfs/namenode&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;dfs.datanode.data.dir&lt;/name&gt;<br>        &lt;value&gt;file:///C:/hadoopsetup/hadoop-3.3.6/data/dfs/datanode&lt;/value&gt;<br>    &lt;/property&gt;<br>&lt;/configuration&gt;</pre><p>Note that these paths use forward slashes. Backslashes inside these values will cause errors.</p><h3>5.4 mapred-site.xml</h3><pre>&lt;configuration&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;mapreduce.framework.name&lt;/name&gt;<br>        &lt;value&gt;yarn&lt;/value&gt;<br>    &lt;/property&gt;<br>&lt;/configuration&gt;</pre><p>If the file is named mapred-site.xml.template instead, make a copy named mapred-site.xml and edit the copy.</p><h3>5.5 yarn-site.xml</h3><pre>&lt;configuration&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;yarn.nodemanager.aux-services&lt;/name&gt;<br>        &lt;value&gt;mapreduce_shuffle&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;yarn.resourcemanager.hostname&lt;/name&gt;<br>        &lt;value&gt;localhost&lt;/value&gt;<br>    &lt;/property&gt;<br>&lt;/configuration&gt;</pre><p>Save all five files before moving on.</p><h3>Step 6: Create the HDFS directories</h3><p>HDFS needs two storage folders: one for the NameNode (metadata) and one for the DataNode (actual data blocks). Open a new PowerShell window and run:</p><pre>New-Item -ItemType Directory -Force -Path &quot;$env:HADOOP_HOME\data\dfs\namenode&quot;<br>New-Item -ItemType Directory -Force -Path &quot;$env:HADOOP_HOME\data\dfs\datanode&quot;</pre><p>This creates the data and dfs parent folders automatically. Verify that both folders exist:</p><pre>Test-Path &quot;$env:HADOOP_HOME\data\dfs\namenode&quot;<br>Test-Path &quot;$env:HADOOP_HOME\data\dfs\datanode&quot;</pre><p>Both commands should return True. The final structure is:</p><pre>C:\hadoopsetup\hadoop-3.3.6\data\dfs\namenode<br>C:\hadoopsetup\hadoop-3.3.6\data\dfs\datanode</pre><p>If you prefer to do it manually, open C:\hadoopsetup\hadoop-3.3.6 in File Explorer, create a folder named <strong>data</strong>, create <strong>dfs</strong> inside it, and create <strong>namenode</strong> and <strong>datanode</strong> inside that. The result is identical.</p><h3>Folder permissions (only if needed)</h3><p>If Hadoop later reports that it cannot write to the NameNode directory, adjust the permissions through Windows:</p><ol><li>Right-click the <strong>namenode</strong> folder and choose <strong>Properties</strong>.</li><li>Open the <strong>Security</strong> tab and click <strong>Edit</strong>.</li><li>Select your Windows account, tick <strong>Full control</strong> under Allow, and click <strong>OK</strong>.</li></ol><h3>Step 7: Format the NameNode</h3><p>Open a new PowerShell window and run:</p><pre>hdfs namenode -format</pre><p>This initializes the HDFS NameNode storage directory. A successful run ends with a message that the storage directory has been successfully formatted.</p><blockquote>Important: Run this command only once, during the initial setup. Do not format the NameNode every time you start Hadoop, because formatting again makes existing HDFS data inaccessible.</blockquote><h3>Step 8: Start Hadoop</h3><h3>Start HDFS</h3><pre>start-dfs.cmd</pre><p>This starts the NameNode and DataNode services, each in its own window. Verify the running processes:</p><pre>jps</pre><p>You should see:</p><pre>NameNode<br>DataNode<br>Jps</pre><h3>Start YARN</h3><pre>start-yarn.cmd</pre><p>This starts the ResourceManager and NodeManager services. Verify again:</p><pre>jps</pre><p>The expected processes are:</p><pre>NameNode<br>DataNode<br>ResourceManager<br>NodeManager<br>Jps</pre><p>Keep the Hadoop daemon windows open while you use the cluster. Each process also prints an ID next to its name in the jps output; that is normal.</p><h3>Stop Hadoop</h3><p>Stop YARN first, followed by HDFS:</p><pre>stop-yarn.cmd<br>stop-dfs.cmd</pre><h3>Verify Hadoop through the web interfaces</h3><p>Once the services have started, open these addresses in your browser:</p><ul><li>HDFS NameNode: <a href="http://localhost:9870/">http://localhost:9870</a></li><li>DataNode: <a href="http://localhost:9864/">http://localhost:9864</a></li><li>YARN ResourceManager: <a href="http://localhost:8088/">http://localhost:8088</a></li></ul><p>The NameNode dashboard should show the HDFS status and one live DataNode. The ResourceManager dashboard should list one active node.</p><p>A process appearing in jps does not necessarily mean that the corresponding service is healthy, so always check the web interfaces as well.</p><h3>In Conclusion</h3><p>You now have Apache Hadoop 3.3.6 configured on your Windows 11 machine with Java 8, HDFS storage and YARN services, and because every setting was made by hand, you know exactly where each one lives.</p><p>From here you can explore HDFS commands, practise MapReduce programming, and move on to Big Data tools such as Spark and Hive, which the next articles in this series will cover.</p><p>If this saved you debugging time, give it a clap and report any bugs you find in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=853e8fbf3914" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Install Apache Hadoop 3.2.4 on Windows 11: Step-by-Step Single-Node Setup]]></title>
            <link>https://medium.com/@basupatil09/how-to-install-apache-hadoop-3-2-4-on-windows-11-step-by-step-single-node-setup-2047a2363359?source=rss-e69366202760------2</link>
            <guid isPermaLink="false">https://medium.com/p/2047a2363359</guid>
            <category><![CDATA[hadoop-installation]]></category>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[apache-hadoop]]></category>
            <dc:creator><![CDATA[Basu Patil]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 16:26:39 GMT</pubDate>
            <atom:updated>2026-11-02T14:10:13.813Z</atom:updated>
            <content:encoded><![CDATA[<p>Run HDFS and YARN on your Windows 11 laptop without installing a virtual machine.</p><p>If you’re learning Big Data, you’ll eventually need a Hadoop environment to practice with. Most tutorials assume Linux, but you can also configure Hadoop on Windows 11 with a few additional components.</p><p>This tutorial walks you through installing Apache Hadoop 3.2.4 with Java 8 and configuring HDFS and YARN on a single Windows machine.</p><p><strong>Note:</strong> This setup is intended for a local learning environment. The winutils.exe and hadoop.dll files used in this tutorial are unofficial community-built binaries.</p><h3>Prerequisites</h3><ul><li>JDK 8 (64-bit)</li><li>Apache Hadoop 3.2.4</li><li>7-Zip (optional)</li><li>winutils.exe and hadoop.dll</li></ul><p><strong>Downloads:</strong></p><ul><li>JDK 8: <a href="https://adoptium.net/temurin/releases/?version=8">https://adoptium.net/temurin/releases/?version=8</a></li><li>7-Zip: <a href="https://www.7-zip.org/download.html">https://www.7-zip.org/download.html</a></li><li>Hadoop 3.2.4: <a href="https://downloads.apache.org/hadoop/common/hadoop-3.2.4/">https://downloads.apache.org/hadoop/common/hadoop-3.2.4/</a></li><li>Windows binaries: <a href="https://github.com/cdarlint/winutils">https://github.com/cdarlint/winutils</a></li></ul><p>Download hadoop-3.2.4.tar.gz from Apache.</p><p>For the Windows support binaries, this installation used winutils.exe and hadoop.dll from the repository&#39;s hadoop-3.2.2/bin directory. These are not exact-version binaries, so compatibility with every Hadoop 3.2.4 operation is not guaranteed.</p><h3>Step 1: Install Java 8</h3><p>Download and install Eclipse Temurin JDK 8 (64-bit).</p><p>The installation used in this tutorial is:</p><pre>C:\Program Files\Eclipse Adoptium\jdk-8.0.504.1-hotspot</pre><p>Hadoop’s Windows scripts can encounter problems when JAVA_HOME contains spaces. To avoid this, use the Windows short path.</p><p>Open Command Prompt and execute:</p><pre>dir /x &quot;C:\Program Files&quot;<br>dir /x &quot;C:\Program Files\Eclipse Adoptium&quot;</pre><p>The short path used in this setup was:</p><pre>C:\PROGRA~1\ECLIPS~1\JDK-80~1.1-H</pre><p>Your short path may differ. Use the path displayed on your computer.</p><p>Verify Java installation:</p><pre>java -version<br>javac -version</pre><p>The output should report Java version 1.8.0_504.</p><h3>Step 2: Extract Hadoop</h3><p>Create a folder named hadoopsetup inside the C drive.</p><p>Open PowerShell and execute:</p><pre>New-Item -ItemType Directory -Force -Path &quot;C:\hadoopsetup&quot;</pre><p>Extract the downloaded Hadoop archive:</p><pre>tar -xzf &quot;$env:USERPROFILE\Downloads\hadoop-3.2.4.tar.gz&quot; -C &quot;C:\hadoopsetup&quot;</pre><p>The extracted folder should be:</p><pre>C:\hadoopsetup\hadoop-3.2.4</pre><p>Verify:</p><pre>Test-Path &quot;C:\hadoopsetup\hadoop-3.2.4&quot;</pre><p>If you use 7-Zip, extract the .tar.gz file into .tar first, then extract the .tar file into C:\hadoopsetup.</p><h3>Step 3: Add Windows support binaries</h3><p>Download winutils.exe and hadoop.dll from the hadoop-3.2.2/bin folder in the cdarlint/winutils GitHub repository.</p><p>Copy both files into:</p><pre>C:\hadoopsetup\hadoop-3.2.4\bin</pre><p>Verify that both files are present:</p><pre>Test-Path &quot;C:\hadoopsetup\hadoop-3.2.4\bin\winutils.exe&quot;</pre><pre>Test-Path &quot;C:\hadoopsetup\hadoop-3.2.4\bin\hadoop.dll&quot;</pre><p>Both commands should return True.</p><p><strong>Note:</strong> These binaries are from Hadoop 3.2.2 because the repository does not provide a corresponding 3.2.4 folder. They are not an exact version match, so full compatibility is not guaranteed.</p><h3>Step 4: Set environment variables</h3><p>Open Start and search for <strong>Edit environment variables for your account</strong>.</p><p>Under User variables, create the following variables:</p><p><strong>JAVA_HOME</strong></p><pre>C:\PROGRA~1\ECLIPS~1\JDK-80~1.1-H</pre><p>Replace this with the actual Java installation path on your computer.</p><p><strong>HADOOP_HOME</strong></p><pre>C:\hadoopsetup\hadoop-3.2.4</pre><p>Edit the User Path variable and add these three entries separately:</p><pre>%JAVA_HOME%\bin<br>%HADOOP_HOME%\bin<br>%HADOOP_HOME%\sbin</pre><p>Click OK to save the changes.</p><p>Close all existing PowerShell windows and open a new one.</p><p>Verify:</p><pre>$env:JAVA_HOME<br>$env:HADOOP_HOME</pre><pre>java -version<br>hadoop version</pre><p>The Hadoop version command should display Hadoop 3.2.4.</p><h3>Step 5: Configure Hadoop</h3><p>Navigate to:</p><pre>C:\hadoopsetup\hadoop-3.2.4\etc\hadoop</pre><p>Open the configuration files and edit the following settings.</p><h3>5.1 hadoop-env.cmd</h3><p>Find the existing JAVA_HOME setting and replace it with:</p><pre>set JAVA_HOME=C:\PROGRA~1\ECLIPS~1\JDK-80~1.1-H</pre><p>Use the same Java short path configured in Step 4.</p><p>Also ensure these settings are present:</p><pre>set HADOOP_CLIENT_OPTS=-Xmx512m %HADOOP_CLIENT_OPTS%<br>set HADOOP_IDENT_STRING=%USERNAME%</pre><p>Important: %USERNAME% automatically takes your current Windows account username. You do not need to replace it manually. If your username contains spaces and Hadoop encounters a username-related startup error, use a simple username without spaces as a troubleshooting measure.</p><p>Save the file.</p><h3>5.2 core-site.xml</h3><pre>&lt;configuration&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;fs.defaultFS&lt;/name&gt;<br>        &lt;value&gt;hdfs://localhost:9000&lt;/value&gt;<br>    &lt;/property&gt;<br>&lt;/configuration&gt;</pre><h3>5.3 hdfs-site.xml</h3><pre>&lt;configuration&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;dfs.replication&lt;/name&gt;<br>        &lt;value&gt;1&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;dfs.namenode.name.dir&lt;/name&gt;<br>        &lt;value&gt;file:///C:/hadoopsetup/hadoop-3.2.4/data/dfs/namenode&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;dfs.datanode.data.dir&lt;/name&gt;<br>        &lt;value&gt;file:///C:/hadoopsetup/hadoop-3.2.4/data/dfs/datanode&lt;/value&gt;<br>    &lt;/property&gt;<br>&lt;/configuration&gt;</pre><h3>5.4 mapred-site.xml</h3><pre>&lt;configuration&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;mapreduce.framework.name&lt;/name&gt;<br>        &lt;value&gt;yarn&lt;/value&gt;<br>    &lt;/property&gt;<br>&lt;/configuration&gt;</pre><p>If the file is named mapred-site.xml.template, create a copy named mapred-site.xml and edit that file.</p><h3>5.5 yarn-site.xml</h3><pre>&lt;configuration&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;yarn.nodemanager.aux-services&lt;/name&gt;<br>        &lt;value&gt;mapreduce_shuffle&lt;/value&gt;<br>    &lt;/property&gt;<br>    &lt;property&gt;<br>        &lt;name&gt;yarn.resourcemanager.hostname&lt;/name&gt;<br>        &lt;value&gt;localhost&lt;/value&gt;<br>    &lt;/property&gt;<br>&lt;/configuration&gt;</pre><p>Save all four configuration files.</p><h3>Step 6: Create HDFS directories and configure permissions</h3><p>Create the NameNode and DataNode storage directories.</p><p>Open PowerShell and execute:</p><pre>New-Item -ItemType Directory -Force -Path &quot;$env:HADOOP_HOME\data\dfs\namenode&quot;<br>New-Item -ItemType Directory -Force -Path &quot;$env:HADOOP_HOME\data\dfs\datanode&quot;</pre><p>Verify both directories:</p><pre>Test-Path &quot;$env:HADOOP_HOME\data\dfs\namenode&quot;<br>Test-Path &quot;$env:HADOOP_HOME\data\dfs\datanode&quot;</pre><p>Both commands should return True.</p><p><strong>Configure folder permissions</strong></p><p>If Windows prevents Hadoop from accessing the NameNode directory, open PowerShell as Administrator.</p><p>Execute:</p><pre>$nn = &quot;C:\hadoopsetup\hadoop-3.2.4\data\dfs\namenode&quot;<br>$account = (whoami).Trim()<br><br>icacls $nn /grant &quot;${account}:(OI)(CI)F&quot; /T<br><br>icacls $nn</pre><p>This grants your current Windows account full control over the NameNode directory.</p><p>After completing this step, return to a normal PowerShell window.</p><h3>Step 7: Format the NameNode</h3><p>Open PowerShell and execute:</p><pre>hdfs namenode -format</pre><p>This initializes the HDFS NameNode storage directory.</p><p>A successful operation should display a message indicating that the NameNode storage directory has been formatted successfully.</p><p><strong>Important:</strong> Run this command only once during the initial setup. Do not format the NameNode every time you start Hadoop, as this can make existing HDFS data inaccessible.</p><h3>Step 8: Start Hadoop</h3><h3>Start HDFS</h3><p>Open PowerShell and execute:</p><pre>start-dfs.cmd</pre><p>This starts the NameNode and DataNode services.</p><p>Verify the running processes:</p><pre>jps</pre><p>You should see:</p><pre>NameNode<br>DataNode<br>Jps</pre><h3>Start YARN</h3><p>Execute:</p><pre>start-yarn.cmd</pre><p>This starts the ResourceManager and NodeManager services.</p><p>Verify again:</p><pre>jps</pre><p>The expected processes are:</p><pre>NameNode<br>DataNode<br>ResourceManager<br>NodeManager<br>Jps</pre><p>Keep the Hadoop daemon windows open while using the cluster.</p><h3>Stop Hadoop</h3><p>To stop the services, execute:</p><pre>stop-yarn.cmd<br>stop-dfs.cmd</pre><p>Stop YARN first, followed by HDFS.</p><h3>Verify Hadoop through the web interfaces</h3><p>Once the services have started, open the following addresses in your browser:</p><p><strong>HDFS NameNode:</strong></p><p><a href="http://localhost:9870/">http://localhost:9870</a></p><p><strong>DataNode:</strong></p><p><a href="http://localhost:9864/">http://localhost:9864</a></p><p><strong>YARN ResourceManager:</strong></p><p><a href="http://localhost:8088/">http://localhost:8088</a></p><p>The NameNode dashboard should show the HDFS status and registered DataNodes. The ResourceManager dashboard allows you to check YARN services and NodeManager health.</p><p>A process appearing in jps does not necessarily mean that the corresponding service is healthy.</p><h3>In Conclusion</h3><p>You now have Apache Hadoop 3.2.4 configured on your Windows 11 machine with Java 8, HDFS storage and YARN services.</p><p>You can now explore HDFS commands, practise MapReduce programming and work with Big Data technologies such as Hive, HBase and Spark.</p><p>If this saved you debugging time, give it a clap and report any bugs you find in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2047a2363359" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>