<?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 Jayvardhan Reddy on Medium]]></title>
        <description><![CDATA[Stories by Jayvardhan Reddy on Medium]]></description>
        <link>https://medium.com/@jayvardhan-reddy-v?source=rss-ab36f74296ff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9_rnR5g60isAW2Jl9a1QUQ.jpeg</url>
            <title>Stories by Jayvardhan Reddy on Medium</title>
            <link>https://medium.com/@jayvardhan-reddy-v?source=rss-ab36f74296ff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 09:31:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jayvardhan-reddy-v/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[Git — Reusing SSH key(RSA)  for multiple IDE’s]]></title>
            <link>https://jayvardhan-reddy-v.medium.com/git-reusing-ssh-key-rsa-for-multiple-ides-7f686046bc2d?source=rss-ab36f74296ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f686046bc2d</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[Jayvardhan Reddy]]></dc:creator>
            <pubDate>Mon, 31 Mar 2025 18:08:02 GMT</pubDate>
            <atom:updated>2025-03-31T18:08:02.909Z</atom:updated>
            <content:encoded><![CDATA[<h3>Git — Reusing SSH key(RSA) for multiple IDE’s</h3><p>If you are planning to use multiple IDE’s on the same system and commit all the changes as part of it to the same GIT account. Then here’s how you can make use of the single SSH key for all the IDE’s. The steps are as follows</p><ol><li>Navigate to windows Tab in the IDE</li><li>Click on Preferences</li><li>Search for SSH</li><li>Click on the Tab Key management</li><li>click on load Existing key</li><li>Select the RSA file</li><li>Enter the Passphrase that was used for the first time while creating RSA key as part of your previous IDE.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*2IthOyiBnOW474eMTbaT7Q.png" /></figure><p>8. You are good to go….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f686046bc2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reality of Xpexctation]]></title>
            <link>https://jayvardhan-reddy-v.medium.com/reality-of-xpexctation-f32d1d5be2e5?source=rss-ab36f74296ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/f32d1d5be2e5</guid>
            <category><![CDATA[reality]]></category>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[disappointment]]></category>
            <category><![CDATA[life]]></category>
            <dc:creator><![CDATA[Jayvardhan Reddy]]></dc:creator>
            <pubDate>Sun, 07 Jan 2024 23:48:12 GMT</pubDate>
            <atom:updated>2024-01-07T23:48:12.467Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you prefer to expect something and have continual disappointment or would you prefer giving up at a long shot?</p><p>We all deny the fact that we do not expect anything from anyone in life . Day in and day out we all expect from the moment we wake up to the moment we go back to sleep ,expectations always there . Truth to be said we expect so many things knowingly or unknowingly our brain works that way consciously or subconsciously ,problem is that is the way we are brought up , the reason or influence for this could be your parents, society, friends anyone or anything you name it, there is always a nature of selfishness in all of us , it’s just some are less and others happen to be more . It is a everyday process it can be the moment you wake up when you wish good morning to someone you expect the same from the other end . To be honest most of our insecurities , problems start here . From the day your born you always try to meet up to expectations, trying to make people happy. You get tired of it. All your life trying to measure up to something to meet the expectations and the failures along the way and no matter what you do you never amount to it, you can never saticify their expectations.</p><p>Our brain works in a mysterious way..</p><p>Expectations are the collateral damage inflicted upon us</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f32d1d5be2e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BigData |Hadoop— 10 Common Mistakes in Sqoop]]></title>
            <link>https://jayvardhan-reddy-v.medium.com/bigdata-hadoop-10-common-mistakes-in-sqoop-91d95a3c35e1?source=rss-ab36f74296ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/91d95a3c35e1</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[sqoop]]></category>
            <dc:creator><![CDATA[Jayvardhan Reddy]]></dc:creator>
            <pubDate>Sun, 19 Nov 2023 01:38:44 GMT</pubDate>
            <atom:updated>2023-11-19T01:38:44.023Z</atom:updated>
            <content:encoded><![CDATA[<p>If your daily activities involve performing Data Ingestion then here are a few issues you come across.</p><p>Some of the things a beginner as well as an experienced need to take care of.</p><p><strong>Problem 1:</strong> If <em>splitby </em>is not declared for query</p><pre>sqoop import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- query “select * from products p, categories c where p.product_category_id = c.category_id” \<br>   -- target-dir /user/jvanchir/sqoop_prac/</pre><p>O/P:</p><p>18/09/14 13:46:17 WARN tool.BaseSqoopTool: Setting your password on the command- line is insecure. Consider using -P instead.<br>When importing query results in parallel, you must specify — split-by.<br>Try — help for usage instructions.</p><p>Solution: Use — split-by or — autoreset-to-one-mapper</p><pre>sqoop import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- query “select * from products p, categories c where p.product_category_id = c.category_id AND \$CONDITIONS” \<br>   -- target-dir /user/jvanchir/sqoop_prac/ \<br>   -- split-by product_id</pre><p><strong>Problem 2:</strong> <em>‘$CONDITIONS’</em> should be used for — query parameter</p><pre>sqoop import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- query “select * from products p, categories c where p.product_category_id = c.category_id” \<br>   -- target-dir /user/jvanchir/sqoop_prac/ \<br>   -- split-by product_id</pre><p>O/P:<br>ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException:<br>Query [select * from products p, categories c where p.product_category_id = c.category_id] must contain ‘$CONDITIONS’ in WHERE clause.</p><p>Solution: Use — split-by or — autoreset-to-one-mapper</p><pre>sqoop import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- query “select * from products p, categories c where p.product_category_id = c.category_id AND \$CONDITIONS” \<br>   -- target-dir /user/jvanchir/sqoop_prac/ \<br>   -- split-by product_id</pre><p><strong>Problem 3:</strong> If a directory with the same name or same data exists in hdfs directory we r trying to export</p><pre>sqoop import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- query “select * from products p, categories c where p.product_category_id = c.category_id AND \$CONDITIONS” \<br>   -- target-dir /user/jvanchir/sqoop_prac/ \<br>   -- split-by product_id</pre><p>O/P:<br>Encountered IOException running import job: org.apache.hadoop.mapred.FileAlreadyExistsException:<br>Output directory hdfs://nn01.cloudera.com:8020/user/jvanchir/sqoop_prac already exists</p><p>solution: use — delete-target-dir</p><pre>sqoop import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- query “select * from products p, categories c where p.product_category_id = c.category_id AND \$CONDITIONS” \<br>   -- target-dir /user/jvanchir/sqoop_prac/ \<br>   -- split-by product_id \<br>   -- delete-target-dir</pre><p><strong>Problem 4: N</strong>o space between the table name and new line parameter</p><pre>sqoop import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- table products\ <br>   -- warehouse-dir /user/jvanchir/sqoop_prac/import_table_dir</pre><p>O/P:<br> 18/09/14 14:24:34 ERROR tool.BaseSqoopTool: Error parsing arguments for import:<br>18/09/14 14:24:34 ERROR tool.BaseSqoopTool: Unrecognized argument: /user/jvanchir/sqoop_prac/import_table_dir</p><p>Solution: give space between them</p><pre> — table products \</pre><p><strong>Problem 5:</strong> when trying to use — split-by attribute on a non-primary key and string Field</p><pre>sqoop import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- table categories \<br>   -- split-by category_name \<br>   -- warehouse-dir /user/jvanchir/sqoop_prac/import_table_dir</pre><p>O/P:<br>Caused by: Generating splits for a textual index column allowed only in case of<br>“-Dorg.apache.sqoop.splitter.allow_text_splitter=true” property passed as a parameter</p><p>Solution: the Dorg.apache.sqoop.splitter.allow_text_splitter=true option should be used as first-line after the import statement</p><pre>sqoop import \<br>   -Dorg.apache.sqoop.splitter.allow_text_splitter=true \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- table categories \<br>   -- split-by category_name \<br>   -- warehouse-dir /user/jvanchir/sqoop_prac/import_table_dir</pre><p><strong>Problem 6:</strong> You cannot use split-by attribute on multiple columns</p><pre>sqoop import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- table products \<br>   -- warehouse-dir /user/jvanchir/sqoop_prac/import_table_dir/mul_split \<br>   -- split-by product_price,product_category_id</pre><p>O/P:<br> Encountered IOException running import job: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:<br> Unknown column ‘product_name,product_category_id’ in ‘field list’</p><p>Solution: Use the — query option instead but on using query — target-dir is a must.</p><pre>sqoop import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- query “ select * from products where product_name = ‘abc’ and product_category_id &gt;= ‘1010’ and \$CONDITIONS “ \<br>   -- target-dir /user/jvanchir/sqoop_prac/import_table_dir/mul_split/products \</pre><p><strong>Problem 7:</strong> During Sqoop Export operation i.e when exporting data from hive/hdfs to SQL table</p><pre>sqoop export \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_export \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- table revenue_prac_col_order \<br>   -- export-dir /apps/hive/warehouse/jvanchir_sqoop_prac.db/daily_revenue \<br>   -- columns order_date,revenue \<br>   -m2</pre><p>at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164) Caused by: java.lang.RuntimeException: Cannot parse input data:<br>‘2013–08–11 00:00:00.071149.59000000008’ at revenue_prac_col_order.__loadFromFields(revenue_prac_col_order.java:267) at</p><p>Solution:</p><pre> — input-fields-terminated-by ‘\001’</pre><p><strong>Problem 8:</strong> When we try to export values from hive/hdfs into MySQL non-null attribute field, if there is an empty data or null data then we get<br>mysql&gt; desc revenue_prac_col_order;<br>+ — — — — — — -+ — — — — — — -+ — — — + — — -+ — — — — -+ — — — -+<br>| Field | Type | Null | Key | Default | Extra |<br>+ — — — — — — -+ — — — — — — -+ — — — + — — -+ — — — — -+ — — — -+<br>| revenue | float | YES | | NULL | |<br>| order_date | varchar(32) | YES | | NULL | |<br>| description | varchar(30) | NO | | NULL | |<br>+ — — — — — — -+ — — — — — — -+ — — — + — — -+ — — — — -+ — — — -+</p><p>hive (jvanchir_sqoop_import)&gt; desc daily_revenue;<br>O/P:<br>OK<br>order_date string<br>_c1 double</p><p>Here hive table has just 2 fields while SQL has 3 fields. Their last column values are empty while exporting into MySQL and throws an error<br>org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164) Caused by: java.sql.SQLException:<br> Field ‘description’ does not have a default value at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)</p><p>Solution:<br> Either export hive table with 3 column non-null values<br> or remove the not null attribute feature in MySQL table for the column while creating.</p><p><strong>Problem 9:</strong> When we try exporting the data multiple times from hive/hdfs into SQL table having a primary key constraint.</p><p>mysql&gt; create table revenue_prac_update(order_date varchar(32) primary key, revenue float);<br>Execute the Below sqoop command twice to get Primary Key constraint error (duplicate insertion)</p><pre>sqoop export \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_export \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- table revenue_prac_update \<br>   -- export-dir /apps/hive/warehouse/jvanchir_sqoop_prac.db/daily_revenue \<br>   -- input-fields-terminated-by ‘\001’ \<br>   - m 4</pre><p>O/P:<br> ERROR [Thread-12] org.apache.sqoop.mapreduce.AsyncSqlOutputFormat: Got exception in update thread:<br> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry ‘2013–07–29 00:00:00.0’ for key ‘PRIMARY’</p><p>Solution: Use the — Update-key attribute</p><pre>sqoop export \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_export \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- table revenue_prac_update \<br>   -- export-dir /apps/hive/warehouse/jvanchir_sqoop_prac.db/daily_revenue \<br>   -- input-fields-terminated-by ‘\001’ \<br>   - m 4 \<br>   -- update-key order_date<br>   -- staging-table revenue_prac_update_stage \<br>   -- clear-stagging-table</pre><p><strong>Problem 10:</strong> When we execute the below sqoop job it fails due to the alignment issue.</p><pre>sqoop job —- create neunJob \<br>   --import \<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- table orders \<br>   -- warehouse-dir /user/jvanchir/sqoop_demo \<br>   -- delete-target-dir<br>   -- validate</pre><p>solution: Give a space for import attribute.</p><pre>sqoop job -- create neunJob \<br>   -- import \  //  Space to be given<br>   -- connect jdbc:mysql://quickstart.cloudera:3306/retail_db \<br>   -- username retail_dba \<br>   -- password cloudera \<br>   -- table orders \<br>   -- warehouse-dir /user/jvanchir/sqoop_demo \<br>   -- delete-target-dir<br>   -- validate</pre><p>Now that you have reached here, you can easily tackle the problems that you would face as a beginner during the process of Data Ingestion using Sqoop.</p><p>If you would like too, you can connect with me on LinkedIn — <a href="https://www.linkedin.com/in/jayvardhan-reddy-vanchireddy">Jayvardhan Reddy</a>.</p><p>If you enjoyed reading it, you can click the clap and let others know about it. If you would like me to add anything else, please feel free to leave a response 💬</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91d95a3c35e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flipside: Life | Death, Love | Hate, Truth | Lie]]></title>
            <link>https://jayvardhan-reddy-v.medium.com/flipside-life-death-love-hate-truth-lie-cd400b127e4d?source=rss-ab36f74296ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd400b127e4d</guid>
            <category><![CDATA[death]]></category>
            <category><![CDATA[love]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[trust]]></category>
            <category><![CDATA[truth]]></category>
            <dc:creator><![CDATA[Jayvardhan Reddy]]></dc:creator>
            <pubDate>Thu, 19 Oct 2023 07:25:39 GMT</pubDate>
            <atom:updated>2023-10-19T07:26:45.486Z</atom:updated>
            <content:encoded><![CDATA[<h4>Life</h4><p>Combination of choices and compromises blend together.</p><h4>Death</h4><p>Salvation from all the materialistic and illusions we strive towards.</p><h4>Love</h4><p>A series of actions to entice one another.</p><h4>Hate</h4><p>A pathway to turn reality into illusion.</p><h4>Truth</h4><p>Ability to break or make thing’s.</p><h4>Lie</h4><p>The fear of losing something you hold.</p><h4>Assumption</h4><p>To think of all possible ways that obscure your view.</p><h4>Confrontation</h4><p>Opportunity to make the right decisions.</p><p>Flipside🔀 a second chance to view both worlds. reach conclusion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd400b127e4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Data Engineer Certification: DP-201]]></title>
            <link>https://jayvardhan-reddy-v.medium.com/azure-data-engineer-certification-dp-201-7207b355b34b?source=rss-ab36f74296ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/7207b355b34b</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Jayvardhan Reddy]]></dc:creator>
            <pubDate>Sun, 17 Jan 2021 15:20:11 GMT</pubDate>
            <atom:updated>2021-01-17T15:20:11.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*FGPk4DEuPSWDkxkC4ioZjA.png" /><figcaption><a href="https://docs.microsoft.com/en-us/learn/certifications/azure-data-engineer">https://docs.microsoft.com/en-us/learn/certifications/azure-data-engineer</a></figcaption></figure><h3>Road to Azure Data Engineer part-2</h3><p>This article is going to be a one-stop destination guide. In order to acquire the Azure Data Engineer certification, you will have to pass 2 certifications(DP-200, DP-201). This article covers DP-201 (<a href="https://docs.microsoft.com/en-us/learn/certifications/exams/dp-201">Designing an Azure Data Solution</a>).</p><h3>Preparation Strategy:</h3><ol><li>Create a free Azure Account.</li><li>Check the syllabus and know the required services.</li><li>Here the importance is given to the security &amp; design aspects of a solution.</li><li>Try to know the architectural aspects and how various services are linked to each other for a particular solution (eg: As mentioned below in the hacks section).</li><li>You can refer to Microsoft documentation and Pluralsight for role-based learning.</li><li>There are Sandbox’s available free of cost which allows you to experiment on various azure services hands-on. <a href="https://docs.microsoft.com/en-us/learn/modules/manage-virtual-machines-with-azure-cli/2-create-a-vm?source=learn">Sandbox sample Link</a></li><li>Finally, <strong>check out the Git repository mentioned below</strong>, It consists of a comprehensive guide to prepare with many <strong>useful resources, sample questions, tips &amp; tricks</strong> to hack the certification questions in case you are unable to answer any.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*TO8CvEfSnCtQoswhdzoaYQ.png" /><figcaption><a href="https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-201">https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-201</a></figcaption></figure><h3>Simple yet very powerful Hacks:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*zGQyNxWr2DScZayQUoVzYQ.png" /><figcaption><a href="https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-201">https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-201</a></figcaption></figure><h3>Various resources and sample practice questions in order to test your knowledge.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*6Foqh-rZDO3aHT7l-SDBzA.png" /><figcaption><a href="https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-201/tree/master/Resources">https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-201/tree/master/Resources</a></figcaption></figure><h3>Repository</h3><p><a href="https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-201">Jayvardhan-Reddy/Azure-Certification-DP-201</a></p><p>I will update the Git repository as and when I come across any new useful tricks, therefore, make sure to fork and star to obtain the latest information. Please do feel free to contribute to it as well.</p><p><strong>All the best.</strong></p><p>If you would like to, you can connect with me on LinkedIn — <a href="https://www.linkedin.com/in/jayvardhan-reddy-vanchireddy">Jayvardhan Reddy</a>.</p><p>#Azure #bigdata #dataengineer #datascience #certification #Microsoft</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7207b355b34b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Data Engineer Certification: DP-200]]></title>
            <link>https://jayvardhan-reddy-v.medium.com/azure-data-engineer-certification-dp-200-2c465bbe7bd6?source=rss-ab36f74296ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c465bbe7bd6</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Jayvardhan Reddy]]></dc:creator>
            <pubDate>Sat, 21 Nov 2020 05:19:16 GMT</pubDate>
            <atom:updated>2020-11-21T05:19:16.665Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*6TzGXOGxjNabi5DUbRb0Hw.png" /><figcaption><a href="https://docs.microsoft.com/en-us/learn/certifications/azure-data-engineer">https://docs.microsoft.com/en-us/learn/certifications/azure-data-engineer</a></figcaption></figure><h3>Road to Azure Data Engineer part-1</h3><p>This article is going to be a one-stop destination guide. In order to acquire the Azure Data Engineer certification, you will have to pass 2 certifications(DP-200, DP-201). This article covers DP-200 (Implementing an Azure Data Solution).</p><h4>Preparation Strategy:</h4><ol><li>Create a free Azure Account.</li><li>Check the syllabus and know the required services.</li><li>Basic knowledge or usage of each service is sufficient.</li><li>The exam is not complex as it does not ask you to implement an end-to-end solution, though requires you to have knowledge of it.</li><li>Make sure to create simple services such as Storage Blob or ADLS creation. These will help you with questions that require you to arrange the solution in sequential orders.</li><li>You can refer to Microsoft documentation and Pluralsight for role-based learning.</li><li>There are Sandbox’s available free of cost which allows you to experiment on various azure services hands-on.</li><li>Finally, <strong>check out the Git repository mentioned below</strong>, It consists of a comprehensive guide to prepare with many <strong>useful resources, sample questions, tips &amp; tricks</strong> to hack the certification questions in case you are unable to answer any.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*ihCD_6LUJRGnpGxUaY9Ahw.png" /><figcaption><a href="https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-200/blob/master/README.md">https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-200/blob/master/README.md</a></figcaption></figure><h4>Hacks to the usage of a service’s available</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*vKl9tIcPw0xAaM2rKbhEkA.png" /><figcaption><a href="https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-200/blob/master/README.md">https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-200/blob/master/README.md</a></figcaption></figure><h4>Various resources and sample practice questions in order to test your knowledge.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*IUW0TngbRD_phL12I6PXNw.png" /><figcaption><a href="https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-200/blob/master/README.md">https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-200/blob/master/README.md</a></figcaption></figure><h4>Repository</h4><p><a href="https://github.com/Jayvardhan-Reddy/Azure-Certification-DP-200">Jayvardhan-Reddy/Azure-Certification-DP-200</a></p><p>I will update the Git repository as and when I come across any new useful tricks, therefore, make sure to fork and star to obtain the latest information. Please do feel free to contribute to it as well.</p><p><strong>All the best.</strong></p><p>If you would like to, you can connect with me on LinkedIn — <a href="https://www.linkedin.com/in/jayvardhan-reddy-vanchireddy">Jayvardhan Reddy</a>.</p><p>#Azure #bigdata #dataengineer #datascience #certification #Microsoft</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c465bbe7bd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apache Spark-3.0 Sneek peak]]></title>
            <link>https://medium.com/data-science/apache-spark-3-0-sneek-peak-284da5ad4166?source=rss-ab36f74296ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/284da5ad4166</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Jayvardhan Reddy]]></dc:creator>
            <pubDate>Mon, 25 Nov 2019 04:03:05 GMT</pubDate>
            <atom:updated>2021-04-30T16:00:29.431Z</atom:updated>
            <content:encoded><![CDATA[<p>Apache Spark has remained strong over the years and now is coming back with one of its major releases with its ongoing goal of Unified Analytics to blend both Batch and Streaming world into one. Let’s see some of the features of it.</p><ol><li>Improved Optimizer and Catalog</li><li>Delta Lake (Acid Transactions) + Linux Foundation</li><li>Koalas: Bringing spark scale to Pandas</li><li>Python Upgrade</li><li>Deep Learning</li><li>Kubernetes</li><li>Scala Version upgrade</li><li>Graph API — Graph and Cypher Script.</li><li>GPU Support and along with Project Hydrogen</li><li>Java Upgrade</li><li>Yarn Upgrade</li><li>Binary Files</li></ol><h4><strong>Improved Optimizer and Catalog:</strong></h4><p>i) <strong>Pluggable Data Catalog: (DataSourceV2)</strong></p><ul><li>Pluggable catalog integration</li><li>Improved pushdown</li><li>Unified APIs for streaming and batch</li></ul><pre>eg: df.writeTo(“catalog.db.table”).overwrite($”year” === “2019”)</pre><p>ii) <strong>Adaptive Query Execution</strong></p><ul><li>Make better optimization decisions during query execution</li></ul><p>eg: It interprets the size of the table and automatically changes from Sort Merge Join into a Broadcast join and so on.. if one of the tables is small</p><ul><li><strong>Dynamic Partition Pruning</strong> speeds up expensive joins</li></ul><p>Based on the dimension table(Small table) filter query fact table(Large table) will also be filtered making the joins easier and optimal</p><h4>Delta-Lake:</h4><p>Delta Lake has been open-sourced for quite some time and has gained its popularity, given its ease of implementation and up-gradation with any existing Spark Applications. I believe, this is a next-generation of Data Lake, which helps overcome Data Swamp as well as the limitations of Lambda and Kappa Architecture. Now with Linux foundation backing up this program will step-up a notch.</p><p>Here are some of the features which help us move one step closer towards Unified Analytics.</p><ul><li>ACID transactions</li><li>Schema enforcement</li><li>Scalable metadata handling</li><li>Time Travel</li></ul><p><strong>Note:</strong> More details related to DeltaLake will be updated once I resume on my upcoming daily posts soon — ( <a href="https://www.linkedin.com/in/jayvardhan-reddy-vanchireddy/"><strong>Follow me</strong></a> or the hashtag <a href="https://www.linkedin.com/feed/hashtag/jayreddy/"><strong>#jayReddy</strong></a> meanwhile)</p><h4>Koalas: Bringing spark scale to Pandas:</h4><p>Koalas have been released recently and it is a big add-on for Python developers both for Data Engineers as well as Data Scientists for its similarities between DataFrames and Pandas. Now they can scale up from a single node environment to the distributed environment without having to learn Spark Dataframes separately.</p><ul><li>Integrated into Python data science ecosystem. e,g: numpy, matpotlib</li><li>60% of the DataFrame / Series API</li><li>60% of the DataFrameGroupBy</li><li>15% of the Index / MultiIndex API</li><li>80% if the plot functions</li><li>90% of Multi-Index Columns</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PN-a3wwWbf6LLOo0" /></figure><h4>Python Upgrade:</h4><p>Python is expected to completely move out from Version 2 to Version 3.</p><h4>Deep Learning:</h4><ul><li>Request GPUs in RDD operations. i.e, you can specify how many GPUs to use per task in an RDD operation, e.g., for DL training and inference.</li><li>YARN+Docker support to launch my Spark application with GPU resources. So you can easily define the DL environment in your Dockerfile.</li></ul><h4>Kubernetes:</h4><p>Host clusters via Kubernetes are the next big thing it could be on-premise or cloud. The ease of deployment, management and the spin-up time is going to be far exceeding compared to the time taken by other orchestrating containers such as Mesos and Docker Swarm.</p><ul><li>Spark-submit with mutating webhook confs to modify pods at runtime</li><li>Auto-discovery of GPU resources</li><li>GPU isolation at the executor pod level</li><li>spark-submit with pod template</li><li>Specify the number of GPUs to use for a task (RDD stage, Pandas UDF)</li></ul><p>Kubernetes orchestrates containers and supports some container runtimes including Docker. Spark (version 2.3+) ships with a docker file that can be used for this purpose and customized to specific application needs.</p><h4>Scala Version upgrade:</h4><ul><li>Scala 2.12</li></ul><h4>Graph API — Graph and Cypher Script:</h4><p>Spark Graph Api has a new add-on.</p><ul><li>A graph along with Property Graph and Cypher Script.</li></ul><p>Cypher query execution, query result handling, and Property Graph storing / loading. The idea behind having a separate module for the API is to allow multiple implementations of a Cypher query engine.</p><ul><li>Graph query will have its own Catalysts &amp; it will follow a similar principle as SparkSQL.</li></ul><h4>GPU Support along with Project Hydrogen:</h4><p>NVIDIA has the best GPU and it has by far surpassed any other vendors. Spark 3.0 best works with this. (NVIDIA RTX — 2080) is something to watch out for.</p><ul><li>Listing GPU Resources</li><li>Auto discover GPU</li><li>GPU Allocation to a Job and Fall-back</li><li>GPU For Pandas UDF</li><li>GPU Utilisation and Monitoring</li><li>supporting heterogeneous GPU (AMD, Intel, Nvidia)</li></ul><h4>Java Upgrade:</h4><p>With every new JDK version release from the Java community, we can see it moving one-step closer towards functional programming.</p><p>The release of the Java-8 version was the beginning of it, starting from Lambda Expressions.</p><p>Here’s an example of a variable declaration:</p><p><strong>Prior to Java 10 version:</strong></p><pre>String text = &quot;HelloO Java 9&quot;;</pre><p><strong>From Java 10 and higher versions:</strong></p><pre>var text = &quot;HelloO Java 10 or Java 11&quot;;</pre><h4>Yarn Upgrade:</h4><ul><li>GPU scheduling support</li><li>Auto-discovery of GPU</li><li>GPU isolation at a process level</li></ul><p>Here’s the configuration setup to support GPU’s from Spark or Yarn 3 version onwards</p><h4>GPU scheduling</h4><p><strong>In resource-types.xml</strong></p><pre>configuration&gt;<br>  &lt;property&gt;<br>     &lt;name&gt;yarn.resource-types&lt;/name&gt;<br>     &lt;value&gt;yarn.io/gpu&lt;/value&gt;<br>  &lt;/property&gt;<br>&lt;/configuration&gt;</pre><p><strong>In yarn-site.xml</strong></p><pre>&lt;property&gt;<br>    &lt;name&gt;yarn.nodemanager.resource-plugins&lt;/name&gt;<br>    &lt;value&gt;yarn.io/gpu&lt;/value&gt;<br>  &lt;/property&gt;</pre><h4>Binary Files:</h4><p>Another file format added to support unstructured data. you can use it load images, videos and so on…. The limitation is that it cannot perform a write operation.</p><pre>val df = spark.read.format(BINARY_FILE).load(&quot;Path&quot;)</pre><p>Now that you know a glimpse of the next major Spark release, you can check out the<strong> </strong><a href="https://spark.apache.org/news/spark-3.0.0-preview.html"><strong>Spark 3.0</strong></a> preview version.</p><p>If you liked this article, then you can check out my article on</p><ul><li><a href="https://medium.com/free-code-camp/deep-dive-into-spark-internals-and-architecture-f6e32045393b"><strong>deep-dive into Spark-Internal-Architecture</strong></a>.</li><li><a href="https://github.com/Jayvardhan-Reddy/BigData-Ecosystem-Architecture"><strong>Big-Data Ecosystem Architecture</strong></a></li></ul><p><strong>Note:</strong> Delta-Lake and Koalas can either be part of Spark-3.0 or remain as a separate entity as part of Databricks.</p><p>If you would like too, you can connect with me on LinkedIn — <a href="https://www.linkedin.com/in/jayvardhan-reddy-vanchireddy">Jayvardhan Reddy</a>.</p><p>#Apachespark #bigdata #dataengineer #datascience #deeplearning #ai #jayReddy #python #scala #spark</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=284da5ad4166" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/apache-spark-3-0-sneek-peak-284da5ad4166">Apache Spark-3.0 Sneek peak</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working of Sqoop Incremental Load]]></title>
            <link>https://medium.com/plumbersofdatascience/working-of-sqoop-incremental-load-bd3d2e0993fb?source=rss-ab36f74296ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd3d2e0993fb</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[sqoop]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[hadoop]]></category>
            <dc:creator><![CDATA[Jayvardhan Reddy]]></dc:creator>
            <pubDate>Tue, 13 Aug 2019 20:50:41 GMT</pubDate>
            <atom:updated>2019-08-13T20:50:41.322Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fEYECcbtUxHwLRQESz5_gA.jpeg" /><figcaption>image Credits: <a href="https://data-flair.training/blogs/features-of-sqoop/">https://data-flair.training/blogs/features-of-sqoop/</a></figcaption></figure><p>In my series of BigData Architecture, we have seen the internal working of Sqoop. Now as part of this article, we&#39;ll see the process behind the execution of Sqoop incremental load in a production environment via various scheduling tools of a Sqoop Job.</p><p>The process is as follows</p><ol><li>Let’s first create a Sqoop job as shown below</li></ol><pre>sqoop job -- create CustomerJob \<br>  -- import \<br>  -- connect jdbc:mysql://localhost:3306/retail_db \<br>  -- username root \<br>  -- password ****** \<br>  -- table customers \<br>  -- check-column customer_id \<br>  -- incremental append \<br>  -- last-value 0 \<br>  -- as-textfile \<br>  -- warehouse-dir= /user/cloudera/sqoop_imported_tables/Cust</pre><p>2. Sqoop metastore:</p><p>Metastore is the place where the metadata of each action performed is logged. Usually, it has information like the schema of the table that it needs to fetch from the source database, the database connection and so on…</p><p>In this case, Sqoop determines the ‘last value’ of the records to be imported in order to perform incremental load.</p><pre>[cloudera@quickstart Desktop]$ cd ~<br>[cloudera@quickstart ~]$ cd .sqoop<br>[cloudera@quickstart .sqoop]$ ll</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*jL4U1w_9PDzcwTq8ijeKbg.png" /></figure><pre>[cloudera@quickstart .sqoop]$ nano metastore.db.script</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RARU4WvzCP6gLL8NntAFbg.png" /></figure><p>3. Execute the Sqoop Job</p><pre>[cloudera@quickstart Desktop]$ sqoop job — exec CustomerJob</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jlZz4TLfwWN9GZJab1CFTA.png" /></figure><p>4. You can see at the end of the sqoop job execution details are written to the metastore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*LFPciqCxt5yumJi7eQ7qvA.png" /></figure><p>5. Let’s check the last value counter in sqoop metastore after sqoop job execution.</p><pre>[cloudera@quickstart .sqoop]$ nano metastore.db.script</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SihKum9KTThZryYfeABdhQ.png" /></figure><p>6. Let&#39;s insert a new record into customer table in order to perform an incremental update</p><pre>mysql&gt; insert into customers values(<a href="/service/mailto:12436,&#39;Jay&#39;,&#39;Reddy&#39;,&#39;****@gmail.com">12436,&#39;Jay&#39;,&#39;Reddy&#39;,&#39;****@gmail.com</a>&#39;,&#39;hello&#39;,&#39;R T Nagar&#39;,&#39;Bangalore&#39;,&#39;Karnataka&#39;,&#39;500032&#39;);</pre><p>7. Execute sqoop job again and you will see only the new record being imported into the sqoop customer table.</p><pre>[cloudera@quickstart Desktop]$ sqoop job — exec CustomerJob</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ReXNhl-RJ2FbYDGy3m7lrw.png" /></figure><p>8. Finally, let&#39;s validate if the last value is being updated from 12435 to 12436</p><pre>[cloudera@quickstart .sqoop]$ nano metastore.db.script</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v-APC1mrgzdnO2hpZB5bjw.png" /></figure><p>Now that we have seen how the incremental update takes, you can debug easily incase of any issues during incremental load of a Sqoop job via sqoop metastore and also reset the ‘last value’ accordingly.</p><p><strong>Note<em>:</em></strong> The commands that were executed related to this post are added as part of my <a href="https://github.com/Jayvardhan-Reddy/BigData_Concepts">GIT </a>account.</p><p>Similarly, you can also read about my BigData Architecture here:</p><ul><li><a href="https://medium.com/free-code-camp/deep-dive-into-spark-internals-and-architecture-f6e32045393b">Deep-dive-into-spark-internals</a> with <strong>code.</strong></li><li><a href="https://medium.freecodecamp.org/an-in-depth-introduction-to-sqoop-architecture-ad4ae0532583">Sqoop Architecture in Depth</a> with <strong>code.</strong></li><li><a href="https://medium.com/plumbersofdatascience/hdfs-architecture-in-depth-1edb822b95fa">HDFS Architecture in Depth</a> with <strong>code</strong>.</li><li><a href="https://medium.com/plumbersofdatascience/hive-architecture-in-depth-ba44e8946cbc">Hive Architecture in Depth</a> with <strong>code</strong>.</li></ul><p>If you would like too, you can connect with me on LinkedIn — <a href="https://www.linkedin.com/in/jayvardhan-reddy-vanchireddy">Jayvardhan Reddy</a>.</p><p>If you liked this article, don’t forget to clap and share!. If you would like me to add anything else, please feel free to leave a response 💬</p><p>#Sqoop #Bigdata #Hadoop #LearnShareGrow #SqoopIncrementalImport #JayReddy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd3d2e0993fb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumbersofdatascience/working-of-sqoop-incremental-load-bd3d2e0993fb">Working of Sqoop Incremental Load</a> was originally published in <a href="https://medium.com/plumbersofdatascience">Plumbers Of Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deep-dive into Spark internals and architecture]]></title>
            <link>https://medium.com/free-code-camp/deep-dive-into-spark-internals-and-architecture-f6e32045393b?source=rss-ab36f74296ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6e32045393b</guid>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Jayvardhan Reddy]]></dc:creator>
            <pubDate>Tue, 14 May 2019 20:18:53 GMT</pubDate>
            <atom:updated>2019-05-14T20:18:53.299Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*EzZs4uEuO30lV51KV07_RA.png" /><figcaption>Image Credits: <a href="https://spark.apache.org/docs/latest/cluster-overview.html">spark.apache.org</a></figcaption></figure><p><strong><em>Apache Spark</em></strong> is an open-source distributed general-purpose cluster-computing framework. A spark application is a JVM process that’s running a user code using the spark as a 3rd party library.</p><p>As part of this blog, I will be showing the way Spark works on Yarn architecture with an example and the various underlying background processes that are involved such as:</p><ul><li>Spark Context</li><li>Yarn Resource Manager, Application Master &amp; launching of executors (containers).</li><li>Setting up environment variables, job resources.</li><li>CoarseGrainedExecutorBackend &amp; Netty-based RPC.</li><li>SparkListeners.</li><li>Execution of a job (Logical plan, Physical plan).</li><li>Spark-WebUI.</li></ul><h4><strong>Spark Context</strong></h4><p>Spark context is the first level of entry point and the heart of any spark application. <strong><em>Spark-shell</em></strong> is nothing but a Scala-based REPL with spark binaries which will create an object sc called spark context.</p><p>We can launch the spark shell as shown below:</p><pre>spark-shell --master yarn \<br> --conf spark.ui.port=12345 \<br> --num-executors 3 \<br> --executor-cores 2 \<br> --executor-memory 500M</pre><p>As part of the spark-shell, we have mentioned the num executors. They indicate the number of worker nodes to be used and the number of cores for each of these worker nodes to execute tasks in parallel.</p><p>Or you can launch spark shell using the default configuration.</p><pre>spark-shell --master yarn</pre><p>The configurations are present as part of <strong>spark-env.sh</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*R5lIUpwSE1ls5VZRuqaCTg.png" /></figure><p>Our Driver program is executed on the Gateway node which is nothing but a spark-shell. It will create a spark context and launch an application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9dj1hxvcUKgAcfAfT-LM5Q.png" /></figure><p>The spark context object can be accessed using <strong>sc.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nFKVxjYE2hj7amh5BC38Ag.png" /></figure><p>After the Spark context is created it waits for the resources. Once the resources are available, Spark context sets up internal services and establishes a connection to a Spark execution environment.</p><h4><strong>Yarn Resource Manager, Application Master &amp; launching of executors (containers).</strong></h4><p>Once the Spark context is created it will check with the <strong><em>Cluster Manager</em></strong> and launch the <strong><em>Application Master </em></strong>i.e, launches a container and registers signal handlers<strong><em>.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LXWQ-AwDrAswv_a8x9Td2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*YZHsfd4Z9zmBNNxiaPfafw.png" /></figure><p>Once the Application Master is started it establishes a connection with the Driver.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*Vu-_y-UcKpzXgPHG0kzMxQ.png" /></figure><p>Next, the ApplicationMasterEndPoint triggers a proxy application to connect to the resource manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1NUyXO8L4mWsEcgZtiGQxw.png" /></figure><p>Now, the Yarn Container will perform the below operations as shown in the diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*HODxFsxN3b7EF8zhHlMIww.png" /><figcaption>Image Credits: <a href="https://jaceklaskowski.gitbooks.io/mastering-apache-spark/yarn/spark-yarn-applicationmaster.html">jaceklaskowski.gitbooks.io</a></figcaption></figure><p>ii) YarnRMClient will register with the Application Master.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*xgfc5O5ej8oCrfB4Iceebw.png" /></figure><p>iii) YarnAllocator: Will request 3 executor containers, each with 2 cores and 884 MB memory including 384 MB overhead</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*ZwsXLMASaTCOgt5w2Dyqtw.png" /></figure><p>iv) AM starts the Reporter Thread</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xOg_CYEdWiVsZElDdhIK6w.png" /></figure><p>Now the Yarn Allocator receives tokens from Driver to launch the Executor nodes and start the containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*se-wIl12S4SjYX4z-RUBPA.png" /></figure><h4><strong>Setting up environment variables, job resources &amp; launching containers.</strong></h4><p>Every time a container is launched it does the following 3 things in each of these.</p><ul><li>Setting up env variables</li></ul><p>Spark Runtime Environment (SparkEnv) is the runtime environment with Spark’s services that are used to interact with each other in order to establish a distributed computing platform for a Spark application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*CT98salrVZ40GxRWiQj7rg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*y56bbA0gNn_ZmfFWI_78fg.png" /></figure><ul><li>Setting up job resources</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mkI-yKQ9p8Z_LwWalUgc_A.png" /></figure><ul><li>Launching container</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n9z7Km5jNVZ7TeT0_Gc9tA.png" /></figure><p>YARN executor launch context assigns each executor with an executor id to identify the corresponding executor (via Spark WebUI) and starts a CoarseGrainedExecutorBackend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*CnxdY21wuqgbQFFDCA1hpQ.png" /></figure><h4><strong>CoarseGrainedExecutorBackend &amp; Netty-based RPC.</strong></h4><p>After obtaining resources from Resource Manager, we will see the executor starting up</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MFqY6xuavDwf789_VklH9A.png" /></figure><p><strong><em>CoarseGrainedExecutorBackend </em></strong>is an ExecutorBackend that controls the lifecycle of a single executor. It sends the executor’s status to the driver.</p><p>When ExecutorRunnable is started, CoarseGrainedExecutorBackend registers the Executor RPC endpoint and signal handlers to communicate with the driver (i.e. with CoarseGrainedScheduler RPC endpoint) and to inform that it is ready to launch tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*B3jXlP_tANrBqk9Di0TB1A.png" /></figure><p><strong><em>Netty-based RPC - </em></strong>It is used to communicate between worker nodes, spark context, executors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lcWfCKNSfaLvcZ8nVhhl6w.png" /></figure><p>NettyRPCEndPoint is used to track the result status of the worker node.</p><p>RpcEndpointAddress is the logical address for an endpoint registered to an RPC Environment, with RpcAddress and name.</p><p>It is in the format as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*O3hCdg-tknytAgXvrvN6Gg.png" /></figure><p>This is the first moment when CoarseGrainedExecutorBackend initiates communication with the driver available at driverUrl through RpcEnv.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f8qiMtsaYMoMGgtymlvlJw.png" /></figure><h4><strong>SparkListeners</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*lXDHbqaMlWMheRDP" /><figcaption>Image Credits:<a href="https://jaceklaskowski.gitbooks.io/mastering-apache-spark/spark-scheduler-LiveListenerBus.html"> jaceklaskowski.gitbooks.io</a></figcaption></figure><p>SparkListener (Scheduler listener) is a class that listens to execution events from Spark’s DAGScheduler and logs all the event information of an application such as the executor, driver allocation details along with jobs, stages, and tasks and other environment properties changes.</p><p>SparkContext starts the LiveListenerBus that resides inside the driver. It registers JobProgressListener with LiveListenerBus which collects all the data to show the statistics in spark UI.</p><p>By default, only the listener for WebUI would be enabled but if we want to add any other listeners then we can use <strong>spark.extraListeners.</strong></p><p>Spark comes with two listeners that showcase most of the activities</p><p>i) StatsReportListener</p><p>ii) EventLoggingListener</p><p><strong><em>EventLoggingListener:</em></strong><em> </em>If you want to analyze further the performance of your applications beyond what is available as part of the Spark history server then you can process the event log data. Spark Event Log records info on processed jobs/stages/tasks. It can be enabled as shown below...</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*yYuuMlB5YaoXp4g62TV7-Q.png" /></figure><p>The event log file can be read as shown below</p><ul><li>The Spark driver logs into job workload/perf metrics in the spark.evenLog.dir directory as JSON files.</li><li>There is one file per application, the file names contain the application id (therefore including a timestamp) application_1540458187951_38909.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*DhOq_zBy4-bXU4ExcD0igA.png" /></figure><p>It shows the type of events and the number of entries for each.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*ROGdvelV-BtOuLU0GYuKuQ.png" /></figure><p>Now, let’s add <strong><em>StatsReportListener </em></strong>to the spark.extraListeners<strong> </strong>and check the status of the job.</p><p>Enable INFO logging level for org.apache.spark.scheduler.StatsReportListener logger to see Spark events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*7arUcUKL-LCn-3pmE7-1yw.png" /></figure><p>To enable the listener, you register it to SparkContext. It can be done in two ways.</p><p>i) Using SparkContext.addSparkListener(listener: SparkListener) method inside your Spark application.</p><p>Click on the link to implement custom listeners - <a href="https://stackoverflow.com/questions/24463055/how-to-implement-custom-job-listener-tracker-in-spark"><strong>CustomListener</strong></a></p><p>ii) Using the conf command-line option</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*xdpqUJ19DlYtun-o0SNCKQ.png" /></figure><p>Let’s read a sample file and perform a count operation to see the StatsReportListener.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*euArfzAcnjE8MM4nSXHffQ.png" /></figure><h4><strong>Execution of a job (Logical plan, Physical plan).</strong></h4><p>In Spark, RDD (<em>resilient distributed dataset</em>) is the first level of the abstraction layer. It is a collection of elements partitioned across the nodes of the cluster that can be operated on in parallel. RDDs can be created in 2 ways.</p><p><strong>i) P<em>arallelizing</em> an existing collection in your driver program</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*RUP1hE1iJG19mJinNGYgXg.png" /></figure><p><strong>ii) Referencing a dataset in an external storage system</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*KWiLRh6A7fNipZUO77F32w.png" /></figure><p>RDDs are created either by using a file in the Hadoop file system, or an existing Scala collection in the driver program, and transforming it.</p><p>Let’s take a sample snippet as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*H2y87GiKFtbLAv7Z57UH8A.png" /></figure><p>The execution of the above snippet takes place in 2 phases.</p><p><strong><em>6.1 Logical Plan:</em> </strong>In this phase, an RDD is created using a set of transformations, It keeps track of those transformations in the driver program by building a computing chain (a series of RDD)as a Graph of transformations to produce one RDD called a <strong><em>Lineage Graph</em></strong>.</p><p>Transformations can further be divided into 2 types</p><ul><li><strong>Narrow transformation: </strong>A pipeline of operations that can be executed as one stage and does not require the data to be shuffled across the partitions — for example, Map, filter, etc..</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*EKaVvvPsDXAvAdjg9_nM2Q.png" /></figure><p>Now the data will be read into the driver using the broadcast variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ciuZ9F2MLxWVGQYyRf09Ug.png" /></figure><ul><li><strong>Wide transformation:</strong> Here each operation requires the data to be shuffled, henceforth for each wide transformation a new stage will be created — for example, reduceByKey, etc..</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*-xcfCKDyovmzGCbN0JIjkQ.png" /></figure><p>We can view the lineage graph by using <strong><em>toDebugString</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*D1h8UhpXXtdZCnMAThyyvA.png" /></figure><p><strong><em>6.2 Physical Plan:</em></strong><em> </em>In this phase, once we trigger an action on the RDD, The <strong><em>DAG Scheduler</em></strong> looks at RDD lineage and comes up with the best execution plan with stages and tasks together with TaskSchedulerImpl and execute the job into a set of tasks parallelly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*3kBQZXJv_KKBaZzKNPdRQA.png" /></figure><p>Once we perform an action operation, the SparkContext triggers a job and registers the RDD until the first stage (i.e, before any wide transformations) as part of the DAGScheduler.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*a0b-Bki3kvjICTRa8mlA3g.png" /></figure><p>Now before moving onto the next stage (Wide transformations), it will check if there are any partition data that is to be shuffled and if it has any missing parent operation results on which it depends, if any such stage is missing then it re-executes that part of the operation by making use of the DAG( Directed Acyclic Graph) which makes it Fault tolerant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-asgHPIWBzYR9E4Pq0d_iQ.png" /></figure><p>In the case of missing tasks, it assigns tasks to executors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lZwx5rvlf5RjsKHBvSoORA.png" /></figure><p>Each task is assigned to CoarseGrainedExecutorBackend of the executor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*Df5VY9tlDd6bTXb0sKIUuA.png" /></figure><p>It gets the block info from the Namenode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*AiRNPTs_0_VTeJ2-7zkorA.png" /></figure><p>now, it performs the computation and returns the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Bnm9f5G2kcgtz-BZWl_Tw.png" /></figure><p>Next, the DAGScheduler looks for the newly runnable stages and triggers the next stage (reduceByKey) operation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-DMnacB41E-T7eS0zPXHiA.png" /></figure><p>The ShuffleBlockFetcherIterator gets the blocks to be shuffled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*AujP4rdEJBY0NZwvVQzTHA.png" /></figure><p>Now the reduce operation is divided into 2 tasks and executed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qQcZ8oCPNFqyV7pVW0_LxA.png" /></figure><p>On completion of each task, the executor returns the result back to the driver.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*cqwp-vnFbpPoJbYEDE263A.png" /></figure><p>Once the Job is finished the result is displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*8cO5xdHRpK5pb80s0cHe7Q.png" /></figure><h4><strong>Spark-WebUI</strong></h4><p>Spark-UI helps in understanding the code execution flow and the time taken to complete a particular job. The visualization helps in finding out any underlying problems that take place during the execution and optimizing the spark application further.</p><p>We will see the Spark-UI visualization as part of the previous <strong>step 6.</strong></p><p>Once the job is completed you can see the job details such as the number of stages, the number of tasks that were scheduled during the job execution of a Job.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9k1USWfNbggNnfaeI-Bw2A.png" /></figure><p>On clicking the completed jobs we can view the DAG visualization i.e, the different wide and narrow transformations as part of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oy87KWizx0SFvMBDVo9pvg.png" /></figure><p>You can see the execution time taken by each stage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F5JpUle8IwuYX2xIiyUUgw.png" /></figure><p>On clicking on a Particular stage as part of the job, it will show the complete details as to where the data blocks are residing, data size, the executor used, memory utilized and the time taken to complete a particular task. It also shows the number of shuffles that take place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SoRyOv7E72nKZMIuJWkKMw.png" /></figure><p>Further, we can click on the Executors tab to view the Executor and driver used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RH7R3E42_08o5y96uYVcPw.png" /></figure><p>Now that we have seen how Spark works internally, you can determine the flow of execution by making use of Spark UI, logs and tweaking the Spark EventListeners to determine optimal solution on the submission of a Spark job.</p><p><strong>Note<em>:</em></strong> The commands that were executed related to this post are added as part of my <a href="https://github.com/Jayvardhan-Reddy/BigData-Ecosystem-Architecture">GIT </a>account.</p><p>Similarly, you can also read more here:</p><ul><li><a href="https://medium.freecodecamp.org/an-in-depth-introduction-to-sqoop-architecture-ad4ae0532583">Sqoop Architecture in Depth</a> with <strong>code.</strong></li><li><a href="https://medium.com/plumbersofdatascience/hdfs-architecture-in-depth-1edb822b95fa">HDFS Architecture in Depth</a> with <strong>code</strong>.</li><li><a href="https://medium.com/plumbersofdatascience/hive-architecture-in-depth-ba44e8946cbc">Hive Architecture in Depth</a> with <strong>code</strong>.</li></ul><p>If you would like too, you can connect with me on LinkedIn — <a href="https://www.linkedin.com/in/jayvardhan-reddy-vanchireddy">Jayvardhan Reddy</a>.</p><p>If you enjoyed reading it, you can click the clap and let others know about it. If you would like me to add anything else, please feel free to leave a response 💬</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6e32045393b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/deep-dive-into-spark-internals-and-architecture-f6e32045393b">Deep-dive into Spark internals and architecture</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An in-depth introduction to SQOOP architecture]]></title>
            <link>https://medium.com/free-code-camp/an-in-depth-introduction-to-sqoop-architecture-ad4ae0532583?source=rss-ab36f74296ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad4ae0532583</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Jayvardhan Reddy]]></dc:creator>
            <pubDate>Tue, 26 Feb 2019 17:53:46 GMT</pubDate>
            <atom:updated>2019-02-26T17:53:46.794Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*3aWPwVLlbZ8sq4aboE_CQw.png" /><figcaption>Image Credits:<a href="https://hadoopsters.net/2015/09/27/pulling-data-from-teradata-to-hadoop-with-apache-sqoop/"> hadoopsters.net</a></figcaption></figure><p><strong>Apache Sqoop</strong> is a data ingestion tool designed for efficiently transferring bulk data between Apache Hadoop and structured data-stores such as relational databases, and vice-versa.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*SFEac5hCBtD4UCP5HA3Wog.png" /><figcaption>Image Credits: <a href="https://www.hdfstutorial.com/sqoop-architecture/">hdfstutorial.com</a></figcaption></figure><p>As part of this blog, I will be explaining how the architecture works on executing a Sqoop command. I’ll cover details such as the jar generation via Codegen, execution of MapReduce job, and the various stages involved in running a Sqoop import/export command.</p><h3><strong>Codegen</strong></h3><p>Understanding Codegen is essential, as internally this converts our Sqoop job into a jar which consists of several Java classes such as POJO, ORM, and a class that implements DBWritable, extending SqoopRecord to read and write the data from relational databases to Hadoop &amp; vice-versa.</p><p>You can create a Codegen explicitly as shown below to check the classes present as part of the jar.</p><pre>sqoop codegen \ <br>  -- connect jdbc:mysql://ms.jayReddy.com:3306/retail_db \ <br>  -- username retail_user \ <br>  -- password ******* \ <br>  -- table products</pre><p>The output jar will be written in your local file system. You will get a Jar file, Java file and java files which are compiled into .class files:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iSUijvVujPR0lGVDZrr-Ig.png" /></figure><p>Let us see a snippet of the code that will be generated.</p><p>ORM class for table ‘products’ // Object-relational modal generated for mapping:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*gKHQcX8ojrEOkFZVbcF2vA.png" /></figure><p>Setter &amp; Getter methods to get values:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*evfXV4tXF2-NJCiWblN7Tw.png" /></figure><p>Internally it uses JDBC prepared statements to write to Hadoop and ResultSet to read data from Hadoop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*HLgX89uP2RVnNbZyN1Xldw.png" /></figure><h3><strong>Sqoop Import</strong></h3><p>It is used to import data from traditional relational databases into Hadoop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*NxBmXayAJOYpffJMr7cepQ.jpeg" /><figcaption>Image Credits: <a href="https://www.dummies.com/programming/big-data/hadoop/hadoop-for-dummies-cheat-sheet/">dummies.com</a></figcaption></figure><p>Let’s see a sample snippet for the same.</p><pre>sqoop import \ <br>  -- connect jdbc:mysql://ms.jayReddy.com:3306/retail_db \ <br>  -- username retail_user \ <br>  -- password ******* \ <br>  -- table products \ <br>  -- warehouse-dir /user/jvanchir/sqoop_prac/import_table_dir \ <br>  -- delete-target-dir</pre><p>The following steps take place internally during the execution of sqoop.</p><p><strong>Step 1</strong>: Read data from MySQL in streaming fashion. It does various operations before writing the data into HDFS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*kbtV3nuBqNOL_5SjQylWvg.png" /></figure><p>As part of this process, it will first generate code (typical Map reduce code) which is nothing but Java code. Using this Java code it will try to import.</p><ul><li>Generate the code. (Hadoop MR)</li><li>Compile the code and generate the Jar file.</li><li>Submit the Jar file and perform the import operations</li></ul><p>During the import, it has to make certain decisions as to how to divide the data into multiple threads so that Sqoop import can be scaled.</p><p><strong>Step 2</strong>: Understand the structure of the data and perform CodeGen</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*yF015rUC0_bcnDcemfhpYA.png" /></figure><p>Using the above SQL statement, it will fetch one record along with the column names. Using this information, it will extract the metadata information of the columns, datatype etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*o0i0IcUqGsLrOVipDinIPA.png" /><figcaption>Image Credits: <a href="http://www.cs.tut.fi/~aaltone3/kurssit/hadoop/Sqoop_pdf.pdf">cs.tut.fi</a></figcaption></figure><p><strong>Step 3</strong>: Create the java file, compile it and generate a jar file</p><p>As part of code generation, it needs to understand the structure of the data and it has to apply that object on the incoming data internally to make sure the data is correctly copied onto the target database. Each unique table has one Java file talking about the structure of data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*LS5Ho9MKAszorjOFBkqgYw.png" /></figure><p>This jar file will be injected into Sqoop binaries to apply the structure to incoming data.</p><p><strong>Step 4</strong>: Delete the target directory if it already exists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*6BWTYq6_4VxWEdOr8Oyz4A.png" /></figure><p><strong>Step 5</strong>: Import the data</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*fHA1-vhDGuSbFPIBwsgUAw.png" /></figure><p>Here, it connects to a resource manager, gets the resource, and starts the application master.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*RAN9rS_cxxVmcAxCM7LFRw.png" /></figure><p>To perform equal distribution of data among the map tasks, it internally executes a boundary query based on the primary key by default<br> to find the minimum and maximum count of records in the table.<br> Based on the max count, it will divide by the number of mappers and split it amongst each mapper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*y7a5StTcFPV5uW9KH-Py8A.png" /></figure><p>It uses 4 mappers by default:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ycuRA4hLUYsdQaywhcW42Q.jpeg" /></figure><p>It executes these jobs on different executors as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1M3RikH0PQvJv9koYauZcA.jpeg" /></figure><p>The default number of mappers can be changed by setting the following parameter:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*vJNjmg0J6NYdLAhKGflcrA.png" /></figure><p>So in our case, it uses 4 threads. Each thread processes mutually exclusive subsets, that is each thread processes different data from the others.</p><p>To see the different values, check out the below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*ZTjZVgHmCOvM6B9_cyRRxg.png" /></figure><p>Operations that are being performed under each executor nodes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SjzMzQJmRa7dPst_TPNazQ.png" /></figure><p>In case you perform a Sqooop hive import, one extra step as part of the execution takes place.</p><p><strong>Step 6</strong>: Copy data to hive table</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lQH-ww92SgO6e-J8kH7P3A.png" /></figure><h3><strong>Sqoop Export</strong></h3><p>This is used to export data from Hadoop into traditional relational databases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jfgX6pxAXGQFaq9GUA02ug.jpeg" /><figcaption>Image Credits: <a href="https://www.slideshare.net/gharriso/from-oracle-to-hadoop-with-sqoop-and-other-tools">slideshare.net</a></figcaption></figure><p>Let’s see a sample snippet for the same:</p><pre>sqoop export \ <br> -- connect jdbc:mysql://ms.jayReddy.com:3306/retail_export \ <br> -- username retail_user \ <br> -- password ******* \ <br> -- table product_sqoop_exp \ <br> -- export-dir /user/jvanchir/sqoop_prac/import_table_dir/products</pre><p>On executing the above command, the execution steps (1–4) similar to Sqoop import take place, but the source data is read from the file system (which is nothing but HDFS). Here it will use boundaries upon block size to divide the data and it is internally taken care by Sqoop.</p><p>The processing splits are done as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*f3WCR4pDcfGy7o_YXui0-w.png" /></figure><p>After connecting to the respective database to which the records are to be exported, it will issue a JDBC insert command to read data from HDFS and store it into the database as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*lt6gN7_4p3FBFyq2b5lXIw.png" /></figure><p>Now that we have seen how Sqoop works internally, you can determine the flow of execution from jar generation to execution of a MapReduce task on the submission of a Sqoop job.</p><p><strong>Note<em>:</em></strong> The commands that were executed related to this post are added as part of my <a href="https://github.com/Jayvardhan-Reddy/BigData-Ecosystem-Architecture">GIT </a>account.</p><p>Similarly, you can also read more here:</p><ul><li><a href="https://medium.com/plumbersofdatascience/hive-architecture-in-depth-ba44e8946cbc">Hive Architecture in Depth</a> with <strong>code</strong>.</li><li><a href="https://medium.com/plumbersofdatascience/hdfs-architecture-in-depth-1edb822b95fa">HDFS Architecture in Depth</a> with <strong>code</strong>.</li></ul><p>If you would like too, you can connect with me on LinkedIn - <a href="https://www.linkedin.com/in/jayvardhan-reddy-vanchireddy">Jayvardhan Reddy</a>.</p><p>If you enjoyed reading this article, you can click the clap and let others know about it. If you would like me to add anything else, please feel free to leave a response 💬</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad4ae0532583" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/an-in-depth-introduction-to-sqoop-architecture-ad4ae0532583">An in-depth introduction to SQOOP architecture</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>