<?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 Ashutosh Shukla &quot;Ash&quot; on Medium]]></title>
        <description><![CDATA[Stories by Ashutosh Shukla &quot;Ash&quot; on Medium]]></description>
        <link>https://medium.com/@shuklaashutosh?source=rss-51161339301a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6Vhn7b99bun72Rx-1qnIEw.jpeg</url>
            <title>Stories by Ashutosh Shukla &amp;quot;Ash&amp;quot; on Medium</title>
            <link>https://medium.com/@shuklaashutosh?source=rss-51161339301a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:24:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shuklaashutosh/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[Setting Up Apache Spark Environment —The Standalone Mode]]></title>
            <link>https://shuklaashutosh.medium.com/setting-up-apache-spark-environment-the-standalone-mode-130b50af1a63?source=rss-51161339301a------2</link>
            <guid isPermaLink="false">https://medium.com/p/130b50af1a63</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[installation]]></category>
            <category><![CDATA[data-lakehouse]]></category>
            <category><![CDATA[spark]]></category>
            <dc:creator><![CDATA[Ashutosh Shukla "Ash"]]></dc:creator>
            <pubDate>Thu, 23 Jan 2025 13:09:52 GMT</pubDate>
            <atom:updated>2025-01-23T13:31:49.429Z</atom:updated>
            <content:encoded><![CDATA[<h4>1. Server (Node) &amp; Software Setup for Apache Spark and Hive Meta Store</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Diz37i_wwEqwb5zR9YgfxQ.png" /><figcaption>Powering up Apache Spark Cluster for High-Scale Data Transformations</figcaption></figure><p><strong>Master</strong></p><ul><li>VM for spark Master — 128 Cores / 256 GB</li><li>Configure Servers with Ubuntu Linux OS (Ubuntu v22.04.5)</li></ul><p><strong>Workers</strong></p><ul><li>8 x Dell R740 — 96 Cores / 256 GB</li><li>8 x Dell R6515 — 128 Cores / 256 GB</li><li>Configure Servers with Ubuntu Linux OS (Ubuntu v22.04.5)</li></ul><p><strong>Object Storage</strong></p><ul><li>Prepare servers for running Apache Spark &amp; Integrating with suitable Object Storage for Data Platform</li></ul><p><strong>2. Steps to Download, Install and Configure Apache Spark in Standalone mode</strong></p><ul><li>Install Java Development Kit (JDK) version 8 or above</li><li>Download latest stable release (e.g., Spark 3.5.2) from the<a href="https://spark.apache.org/downloads.html"> Apache Spark download page</a></li><li>Set Environment Variables &amp; reload the profile</li><li>Edit .bashrc or /etc/profile to include Spark-related environment variables</li></ul><p>Then,</p><ul><li>Start the Master Node</li></ul><pre> $SPARK_HOME/sbin/start-master.sh</pre><ul><li>Start a Worker Node — By default, workers connect to the master at <em>spark://&lt;hostname&gt;:7077</em></li></ul><pre>$SPARK_HOME/sbin/start-worker.sh spark://&lt;master-hostname&gt;:7077</pre><ul><li>Access the Web UI — Monitor the Spark cluster from the web UI at <em>http://&lt;master-IP&gt;:8080</em></li></ul><p><strong>3. Steps to Download, Install and Configure Hive Meta Store with PostgreSql</strong></p><p>Hive Meta Store is required to store metadata into the tables and PostgreSql can be used as its backend database to ensure durability and reliability.</p><ul><li>Download Hive from the<a href="https://hive.apache.org/downloads.html"> Apache Hive download page</a></li><li>Edit <em>.bashrc</em> or <em>/etc/profile</em> to include Hive-related environment variables</li><li>Configure Hive to Use PostgreSQL — <em>Add Postgres Connector to Hive</em></li><li>Download the <em>Postgres Connector JAR</em> and place it in the Hive lib directory</li><li>Copy hive-default.xml.template <em>hive-site.xml</em> located in <em>$HIVE_HOME/conf</em></li><li>Configure the <em>hive-site.xml</em> file</li></ul><pre>wget https://archive.apache.org/dist/hive/hive-3.1.3/apache-hive-3.1.3-bin.tar.gz<br>tar -xzf apache-hive-3.1.3-bin.tar.gz<br>mv apache-hive-3.1.3-bin /usr/local/hive<br>export HIVE_HOME=/usr/local/hive<br>export PATH=$PATH:$HIVE_HOME/bin<br>source ~/.bashrc<br>wget https://repo1.maven.org/maven2/org/postgresql/postgresql/42.7.0/postgresql-42.7.0.jar<br>cp postgresql-42.7.0.jar $HIVE_HOME/lib/<br>cp postgresql-42.7.0.jar $SPARK_HOME/jars</pre><ul><li>Install Postgresql &amp; start service</li></ul><pre>sudo apt update<br>sudo apt install postgresql -y<br>systemctl start postgresql.service</pre><ul><li>Create a database for the Hive Meta Store and a user with appropriate permissions:</li></ul><pre>su - postgres<br>psql<br>CREATE DATABASE hivemetastore;<br>CREATE USER hiveuser WITH PASSWORD &#39;hivepassword&#39;;<br>GRANT ALL PRIVILEGES ON DATABASE hivemetastore TO hiveuser;<br>\q</pre><p><strong>4. Download, Install and Configure Hadoop</strong></p><ul><li>Download Hadoop from the<a href="https://archive.apache.org/dist/hadoop/common/hadoop-3.3.4/hadoop-3.3.4.tar.gz"> Apache Hadoop download page</a></li><li>Edit <em>.bashrc</em> or <em>/etc/profile</em> to include Hadoop-related environment variables.</li></ul><pre>wget https://archive.apache.org/dist/hadoop/common/hadoop-3.3.4/hadoop-3.3.4.tar.gz<br>tar -xzf hadoop-3.3.4.tar.gz<br>mv hadoop-3.3.4 /usr/local/hadoop<br>export HADOOP_HOME=/usr/local/hadoop<br>export PATH=$PATH:$HADOOP_HOME/bin<br>source ~/.bashrc</pre><ul><li>Configure <em>Hadoop-env.sh</em> (in <em>Hadoop_Home</em>) to access Object Storage.</li><li>Download <a href="https://github.com/Pure-Storage-Solutions/spark-hive-pg/blob/main/sample-code/core-site.xml"><em>core-site.xml</em></a><em> </em>and Update the variables like <em>bucket name</em>, <em>s3 access key </em>&amp; <em>secret key</em> and <em>endpoints</em></li></ul><pre>export HADOOP_OPTIONAL_TOOLS=&quot;hadoop-aws&quot;<br>hadoop fs -ls s3a://&lt;bucket name&gt;</pre><ul><li>Initialize the Hive Meta Store (HMS) Schema</li></ul><pre>cd $HIVE_HOME/bin<br>$HIVE_HOME/bin/schematool -dbType postgres -initSchema<br><br>su - postgres<br>psql<br>postgres=# \c hivemetastore<br>#You are now connected to database &quot;hivemetastore&quot; as user &quot;postgres&quot;.<br><br>hivemetastore=# GRANT CREATE ON SCHEMA public TO hiveuser;<br>#GRANT<br><br>hivemetastore=# \q</pre><p><strong>5. Connect Apache Spark to Hive Metastore</strong></p><ul><li>Copy the Hive configuration file (<em>hive-site.xml</em>) to the Spark configuration directory (<em>$SPARK_HOME/conf</em>)</li><li>Start Spark Shell with Hive Support</li></ul><pre>cp $HIVE_HOME/conf/hive-site.xml $SPARK_HOME/conf/<br>spark-shell - conf spark.sql.catalogImplementation=hive</pre><p>6. <strong>Validate the Installation</strong></p><ul><li>Start the HiveServer to interact with Hive through JDBC or Beeline</li><li>create a test table in the Hive Meta Store</li><li>Open a Spark shell and run the following commands to query the Hive table:</li></ul><pre>$HIVE_HOME/bin/hive - service hiveserver2 &amp;<br>/usr/local/hive/bin/hive - service metastore &amp;<br>/usr/local/hive/bin/beeline -u jdbc:hive2://<br><br>-- # at Hive Prompt<br><br>&gt;&gt; CREATE TABLE test_table (id INT, name STRING);<br>&gt;&gt; spark.sql(&quot;SHOW TABLES&quot;).show()<br>&gt;&gt; spark.sql(&quot;SELECT * FROM test_table&quot;).show()</pre><p><em>test_table</em> gets created in Hive Meta Store (HMS) and this can be verified using Spark SQL Describe commands.</p><p><em>… Voila! Our Mighty Spark Cluster is ready to do all the BIG Data Heavy lifting ! We will see more of it in the Next Article … Stay Tuned !!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=130b50af1a63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transforming Open Data LakeHouses with Apache Spark]]></title>
            <link>https://shuklaashutosh.medium.com/transforming-open-data-lakehouses-with-apache-spark-1524bb343e8f?source=rss-51161339301a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1524bb343e8f</guid>
            <category><![CDATA[data-lakehouse]]></category>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[performance-benchmarking]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Ashutosh Shukla "Ash"]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 05:45:31 GMT</pubDate>
            <atom:updated>2025-01-23T13:30:16.008Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Processing Open Table / File formats for Benchmarking Performance</strong></h3><p>In this series of Blog articles, I am going to talk about the Modern Data Lakehouses a.k.a. Open Data Platforms doing all heavy lifts &amp; shifts and thus shaping the data as per new requirements in terms of their formats and places!</p><p>Let me start with Part 1 (This Article) with basic definitions of terms being used here for sake of clarity.</p><p><strong>Data LakeHouses</strong></p><ul><li>Combine the best elements of <a href="https://en.wikipedia.org/wiki/Data_lake">Data lake</a> &amp; <a href="https://en.wikipedia.org/wiki/Data_warehouse">Data warehouse</a></li><li>Are built on Open Source &amp; Open Standards</li><li>Simplify data estate by eliminating Silos, which impedes enterprise data value creation</li><li>Reduce costs and delivers Data/AI Initiatives faster!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f8x4QnWZ6HbZPrE5" /><figcaption>Conceptualizing a Data Lakehouse</figcaption></figure><p>A Data Lakehouse is a new, open data management architecture that combines the flexibility, cost-efficiency, and scale of <a href="https://www.databricks.com/discover/data-lakes/introduction">data lakes</a> with the data management and ACID transactions of data warehouses, enabling business intelligence (BI) and machine learning (ML) on all data.</p><p>We plan to leverage Apache Spark for data processing, using open file and table formats such as:</p><p><strong>Delta Lake</strong></p><ul><li>Parquet</li></ul><p><strong>Iceberg</strong></p><ul><li>Parquet</li><li>ORC</li><li>AVRO</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/0*loJEhRYFe2DV19iJ" /><figcaption>Popular Big Data Format s — Open Source</figcaption></figure><p>Here we’re gonna exploit object storage into a scalable, high-performance, and secure data lakehouse solution.</p><p>We will be benchmarking performance of our DLH using <a href="https://www.tpc.org/tpcds/">https://www.tpc.org/tpcds/</a> : The Transaction Processing Performance Council (TPC) defines Transaction Processing and Database Benchmarks and delivers trusted results to the industry.</p><p>While setting up the system and during experiments, I realize that the combination of Apache Spark, Hive Metastore, and Open file/table formats on cloud object storage creates a powerful solution for data analytics that emphasizes performance, scalability, and ease of management.</p><ul><li>Apache Spark provides a distributed computing engine for processing large datasets</li><li>Hive Metastore acts as a centralized metadata repository to manage table schemas and ensure consistency</li><li>By integrating cloud object storage having Open file/table data, this solution provides a scalable and fast storage backend capable of handling high-throughput data operations, making it ideal for modern data lakehouse architectures.</li></ul><p>Next, we are gonna do Environment setup so that we can conduct our experiments using the aforementioned Open Source tech stack.</p><p><em>Setting up a Standalone Apache Spark Cluster with Hive Meta Store:</em></p><p><a href="https://medium.com/@shuklaashutosh/setting-up-apache-spark-environment-the-standalone-mode-130b50af1a63">https://medium.com/@shuklaashutosh/setting-up-apache-spark-environment-the-standalone-mode-130b50af1a63</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1524bb343e8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>