<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: kambala yashwanth</title>
    <description>The latest articles on Forem by kambala yashwanth (@yashwanth2804).</description>
    <link>https://forem.com/yashwanth2804</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F84707%2F5abb5fd0-da0e-4bb9-b747-ad2e2d83715c.png</url>
      <title>Forem: kambala yashwanth</title>
      <link>https://forem.com/yashwanth2804</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/yashwanth2804"/>
    <language>en</language>
    <item>
      <title>I Built a Browser Extension to Seamlessly Link GitLab Branches from Linear Issues! 🚀</title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Tue, 06 Aug 2024 14:27:30 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/i-built-a-browser-extension-to-seamlessly-link-gitlab-branches-from-linear-issues-k4a</link>
      <guid>https://forem.com/yashwanth2804/i-built-a-browser-extension-to-seamlessly-link-gitlab-branches-from-linear-issues-k4a</guid>
      <description>&lt;p&gt;Hey Dev.to Community!&lt;/p&gt;

&lt;p&gt;I recently wrapped up a small project that I’m pretty excited about—a browser extension that adds a direct link to the corresponding GitLab branch right within your Linear issues. 🎉&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fyashwanth2804%2FLinear-gitlab-extention%2Fraw%2Fmain%2Fdemo_img%2Fextesnionui_mask.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fyashwanth2804%2FLinear-gitlab-extention%2Fraw%2Fmain%2Fdemo_img%2Fextesnionui_mask.png" alt="Extention"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Backstory&lt;br&gt;
While using Linear and GitLab together, I found it annoying that I couldn’t easily jump to the GitLab branch right after creating an issue. I had to wait until a Merge Request was raised, which felt like an unnecessary step. So, I decided to build a solution!&lt;/p&gt;

&lt;p&gt;What It Does&lt;br&gt;
This extension automatically generates the link to the GitLab branch as soon as an issue is created in Linear. Now, instead of manually searching for the branch, you can just click the link that appears on the issue page. Simple, but super effective!&lt;/p&gt;

&lt;p&gt;Why I Built It&lt;br&gt;
I built this to make my own workflow smoother, but I figured others might benefit from it too. If you’re working with Linear and GitLab, give it a try and let me know how it works for you.&lt;/p&gt;

&lt;p&gt;Check It Out&lt;br&gt;
You can find the project on &lt;br&gt;
&lt;a href="https://github.com/yashwanth2804/Linear-gitlab-extention" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. I’d love to hear your thoughts or any suggestions you might have for improvements!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.producthunt.com/posts/linear-lab-linker?embed=true&amp;amp;utm_source=badge-featured&amp;amp;utm_medium=badge&amp;amp;utm_souce=badge-linear-lab-linker" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fapi.producthunt.com%2Fwidgets%2Fembed-image%2Fv1%2Ffeatured.svg%3Fpost_id%3D476919%26theme%3Dlight" alt="Linear Lab Linker - extension that links between Linear.app and GitLab branch | Product Hunt"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading, and happy coding! 😊&lt;/p&gt;

</description>
      <category>extensions</category>
      <category>linear</category>
      <category>gitlab</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Desktop App with multiple LLM chat site at same place</title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Fri, 19 Apr 2024 03:05:54 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/desktop-app-with-multiple-llm-chat-site-at-same-place-5cii</link>
      <guid>https://forem.com/yashwanth2804/desktop-app-with-multiple-llm-chat-site-at-same-place-5cii</guid>
      <description>&lt;p&gt;I recently dived into Rust programming and crafted a desktop application. It's designed for comparing and testing the leading LLM chat sites. This tool comes in handy if you're seeking diverse perspectives on a particular topic, as it provides insights from various LLMs.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/yashwanth2804" rel="noopener noreferrer"&gt;
        yashwanth2804
      &lt;/a&gt; / &lt;a href="https://github.com/yashwanth2804/multi-llm-rust-app" rel="noopener noreferrer"&gt;
        multi-llm-rust-app
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A Rust written web app that have a split view of popular ChatGpt, Gemini and Claude for fasst and quick interaction b/w LLMs  🚀
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Multi-LLM Rust App&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;This is a Rust application that demonstrates the use of multiple Low-Level Modules (LLMs) [chatGpt,Gemini,Claude] in same window at a time.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/yashwanth2804/multi-llm-rust-appLLM_all_rust.png"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fyashwanth2804%2Fmulti-llm-rust-appLLM_all_rust.png" alt="s"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Getting Started&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Prerequisites&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;You need to have Rust installed on your machine. If you don't have it installed, you can install it using the following command:&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Installing&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Clone the repository to your local machine:&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;git clone https://github.com/yourusername/multi-llm-rust-app.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Navigate to the project directory:&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;cd multi-llm-rust-app
cargo build
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To build the executable, run:&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;cargo build --release
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;The executable will be located in the target/release directory.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Passing Arguments&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;You can pass arguments from the command line to change the order of the webview. The arguments are codes for different modules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ch for ChatGPT&lt;/li&gt;
&lt;li&gt;Gi for Gemini&lt;/li&gt;
&lt;li&gt;Cl for Claude&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;For example, if you want to order the…&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/yashwanth2804/multi-llm-rust-app" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>chatgpt</category>
      <category>rust</category>
      <category>gemini</category>
      <category>desktopapp</category>
    </item>
    <item>
      <title>What is the difference between these two ways of serving React App </title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Tue, 31 Aug 2021 12:28:28 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/what-is-the-difference-between-these-two-ways-of-serving-react-app-1gh1</link>
      <guid>https://forem.com/yashwanth2804/what-is-the-difference-between-these-two-ways-of-serving-react-app-1gh1</guid>
      <description>&lt;p&gt;I would like to serve a react project from the nodejs server. I encountered the two ways of doing it , the first ways is to use express to serve just the build folder for whatever the req made.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;__dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;build&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sendFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;__dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;build&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;index.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second way is one using &lt;code&gt;ReactDOM.hydrate&lt;/code&gt; and &lt;code&gt;ReactDOMServer.renderToString&lt;/code&gt; to serve the app.&lt;br&gt;
refer this link &lt;a href="https://www.digitalocean.com/community/tutorials/react-server-side-rendering"&gt;https://www.digitalocean.com/community/tutorials/react-server-side-rendering&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What is best way to achieve the good SEO from the above mentioned ways? and also when to choose one over other.&lt;/p&gt;

&lt;p&gt;Thnak you!!!&lt;/p&gt;

</description>
      <category>help</category>
      <category>react</category>
      <category>node</category>
    </item>
    <item>
      <title>Are curved PC monitors good for programming ?  </title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Sun, 21 Jun 2020 14:22:12 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/are-curved-pc-monitors-good-for-programming-31p</link>
      <guid>https://forem.com/yashwanth2804/are-curved-pc-monitors-good-for-programming-31p</guid>
      <description>&lt;p&gt;UM.UE2SS.002&lt;br&gt;
After a long time I joined PC master race,I hadn't had any experience/ feel with it curved monitors.I have been doing whole life with a flat screen monitors.I typically develop websites so can this curveness have any effect on UI comparing to flat ones.If any of you using this how is your switch to the curved monitors ?&lt;/p&gt;

</description>
      <category>monitor</category>
      <category>discuss</category>
    </item>
    <item>
      <title>[Solved] DEV API Can't able to update an article !</title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Tue, 10 Mar 2020 07:44:15 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/dev-api-can-t-able-to-update-an-article-3a66</link>
      <guid>https://forem.com/yashwanth2804/dev-api-can-t-able-to-update-an-article-3a66</guid>
      <description>&lt;p&gt;I am using postman to create new Articles , but failing to update the article&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating an article
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z863VDFM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lcv76gqyvfzsgjqfh0rw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z863VDFM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lcv76gqyvfzsgjqfh0rw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Updating an article
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W0V5S_qV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/iyuh3tfqel442brc2hle.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W0V5S_qV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/iyuh3tfqel442brc2hle.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please give me any working examples of creating and updating an article&lt;/p&gt;

&lt;p&gt;getting when i try to update article&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;The page you were looking for doesn't exist (404)&amp;lt;/title&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width,initial-scale=1"&amp;gt;
    &amp;lt;style&amp;gt;
        .not-found-page {
            height: 100vh;
            min-height: 500px;
        }

        .tv__outer {
            display: table;
            position: absolute;
            height: 98%;
            width: 98%;
        }

        .tv__middle {
            display: table-cell;
            vertical-align: middle;
            position: relative;
        }

        .tv__inner {
            margin-left: auto;
            margin-right: auto;
            display: table;
        }

        .tv__inner--special {
            position: absolute;
            left: 0;
            right: 0;
            margin: auto;
            -webkit-animation-name: fade;
            -webkit-animation-iteration-count: infinite;
            -webkit-animation-duration: 2s;
            animation-name: fade;
            animation-iteration-count: infinite;
            animation-duration: 2s;
        }

        .tv__inner--text {
            margin-left: auto;
            margin-right: auto;
            display: table;
            font-size: 22px;
            font-weight: 500;
        }

        .tv__inner--special,
        .tv__inner {
            max-width: 85%;
            width: 300px;
            border: 25px solid rgb(54, 55, 124);
            border-radius: 36px;
        }

        .tv__inner--text {
            text-align: center;
            max-width: 90%;
        }

        @-webkit-keyframes fade {
            0% {
                opacity: 1;
            }

            10% {
                opacity: 1;
            }

            20% {
                opacity: 0;
            }

            25% {
                opacity: 0;
            }

            28% {
                opacity: 0;
            }

            30% {
                opacity: 0;
            }

            33% {
                opacity: 1;
            }

            45% {
                opacity: 1;
            }

            53% {
                opacity: 0;
            }

            100% {
                opacity: 0;
            }
        }

        @keyframes fade {
            0% {
                opacity: 1;
            }

            10% {
                opacity: 1;
            }

            20% {
                opacity: 0;
            }

            25% {
                opacity: 0;
            }

            28% {
                opacity: 0;
            }

            30% {
                opacity: 0;
            }

            33% {
                opacity: 1;
            }

            45% {
                opacity: 1;
            }

            53% {
                opacity: 0;
            }

            100% {
                opacity: 0;
            }
        }
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
    &amp;lt;div class="not-found-page base-background-color"&amp;gt;
        &amp;lt;div class="tv__outer"&amp;gt;
            &amp;lt;div class="tv__middle"&amp;gt;
                &amp;lt;img class="tv__inner--special" src="https://i.imgur.com/Vyyjycv.gif" alt="404 not found image as TV static"&amp;gt;
                &amp;lt;img class="tv__inner" src="https://i.imgur.com/3v0LCiP.jpg" alt="404 not found DEV logo"&amp;gt;
                &amp;lt;br&amp;gt;
                &amp;lt;p class="tv__inner--text"&amp;gt;This page does not exist &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &amp;lt;a href="https://dev.to/"&amp;gt;Return to Home
                        Page&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>help</category>
      <category>devapi</category>
      <category>api</category>
      <category>curl</category>
    </item>
    <item>
      <title>Is there private posts/articles feature in DEV ?</title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Wed, 26 Feb 2020 08:39:16 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/is-there-private-posts-articles-feature-in-dev-25ao</link>
      <guid>https://forem.com/yashwanth2804/is-there-private-posts-articles-feature-in-dev-25ao</guid>
      <description>

</description>
    </item>
    <item>
      <title>Implementing Spark in Spring-boot </title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Mon, 27 Jan 2020 14:11:07 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/implementing-spark-in-spring-boot-437f</link>
      <guid>https://forem.com/yashwanth2804/implementing-spark-in-spring-boot-437f</guid>
      <description>&lt;p&gt;I am here to share you guys the integration of spark in the spring-boot application.&lt;/p&gt;

&lt;p&gt;Usually spark is useful in multi-node/cluster environment.If you are using a single node cluster and using sparing-boot to submit jobs and getting workflow results to show somewhere in your web application.Then this approach will be straight forward way.The spring rest-api will launch spark jobs and the computed results will be given as a response.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/yashwanth2804"&gt;
        yashwanth2804
      &lt;/a&gt; / &lt;a href="https://github.com/yashwanth2804/spring-spark-example"&gt;
        spring-spark-example
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      An example of setting up Spring-Boot with Spark.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
spring-spark-example&lt;/h1&gt;
&lt;p&gt;An example of setting up Spring-Boot with Spark.&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/yashwanth2804/spring-spark-example"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h1&gt;
  
  
  Job Submissions
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Typical way
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;CLI
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Run application locally on 8 cores
./bin/spark-submit \
  --class org.apache.spark.examples.SparkPi \
  --master local[8] \
  /path/to/examples.jar \
  100

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;CURL
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -X POST -d http://master-host:6066/v1/submissions/create --header "Content-Type:application/json" --data '{
  "action": "CreateSubmissionRequest",
  "appResource": "hdfs://localhost:9000/user/spark-examples_2.11-2.0.0.jar",
  "clientSparkVersion": "2.0.0",
  "appArgs": [ "10" ],
  "environmentVariables" : {
    "SPARK_ENV_LOADED" : "1"
  },
  "mainClass": "org.apache.spark.examples.SparkPi",
  "sparkProperties": {
    "spark.jars": "hdfs://localhost:9000/user/spark-examples_2.11-2.0.0.jar",
    "spark.driver.supervise":"false",
    "spark.executor.memory": "512m",
    "spark.driver.memory": "512m",
    "spark.submit.deployMode":"cluster",
    "spark.app.name": "SparkPi",
    "spark.master": "spark://master-host:6066"
  }
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Springboot rest api
&lt;/h1&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8056/api/mongodb

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>springboot</category>
      <category>spark</category>
      <category>restapi</category>
    </item>
    <item>
      <title>TIL that how to change terminal title</title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Tue, 17 Dec 2019 08:12:04 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/til-that-changing-terminal-title-1lbh</link>
      <guid>https://forem.com/yashwanth2804/til-that-changing-terminal-title-1lbh</guid>
      <description>&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;Being a dev I mostly rely on terminal running react and multiple springboot jars and mongodb in side by side .  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) open &lt;code&gt;~./bashrc&lt;/code&gt; file and  Add this at the end of the file&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;termtitle() { PROMPT_COMMAND='echo -ne "\033]0; '$1' \007"'; }

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2) Applying changes&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3) Change Terminal title&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;termtitle "my title"

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>todayilearned</category>
      <category>terminal</category>
    </item>
    <item>
      <title>TICKER SEARCH API</title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Thu, 12 Dec 2019 07:18:10 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/ticker-search-api-34p5</link>
      <guid>https://forem.com/yashwanth2804/ticker-search-api-34p5</guid>
      <description>&lt;h3&gt;
  
  
  Ticker Symbol Api End Point
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What is the project about?
&lt;/h4&gt;

&lt;p&gt;Recently I had a hackathon challenge to work on realtime stock markect data end points.After the hours of research from the various stock market end-point-apis , I had short listed a few.I thought that might be enough to complete my project.&lt;/p&gt;

&lt;p&gt;1) &lt;a href="'https://iextrading.com/developer/docs/'"&gt;IEX&lt;/a&gt; , &lt;br&gt;
Pros: &lt;br&gt;
A real boon to stock market app developers because of the free unlimited api calls without any limitation. &lt;br&gt;
Cons: &lt;br&gt;
No realtime data , only with 15 min delay&lt;/p&gt;

&lt;p&gt;2) &lt;a href="'https://www.alphavantage.co/documentation/'"&gt;AlphaVantage&lt;/a&gt;, &lt;br&gt;
Pros:&lt;br&gt;
A site for pro developers with near realtime data/live stock data but comes with api key mess and limitation on requests/min made  &lt;/p&gt;

&lt;p&gt;After a few days of walkthrough, I found my self on the fence because I have to make an auto complete search field like google search box for stock name/symbol searches.&lt;/p&gt;

&lt;p&gt;the main catch here is &lt;a href="'https://www.alphavantage.co/documentation/#symbolsearch'"&gt;Symbol Search AutoComplete&lt;/a&gt; functionality already found in AlphaVantage, that too 5 API calls/min and 500 api calls/day.Imagine your end user typing keyword of length about 6 char in a minute then you will run out of APIs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sPRAH8QT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.steemitimages.com/DQmbT3RLphBm3kSgGC5MF1iJ9jAZqVVUUtX3khgnJsS3eLu/alphavantageAPI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sPRAH8QT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.steemitimages.com/DQmbT3RLphBm3kSgGC5MF1iJ9jAZqVVUUtX3khgnJsS3eLu/alphavantageAPI.png" alt="alphavantageAPI.png"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Then I had an idea of mixing the both worlds, no API key mess from IEX and high end functionality from AlphaVantage. At first I googled if any already existed but found none while yahoo fiance api was widely used for keyword search,sadly it's deprecated. I had no other choice to stick to AlphaVintage which costs around $30/month,30 api/min.&lt;/p&gt;

&lt;p&gt;Thus I ended up making my own keyword filtering on ~8000 stock symbols  downloaded data.I thought it could be great if I host in cloud so that other devs can also use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  tickersearch API [Just, I named it so]
&lt;/h2&gt;

&lt;p&gt;Github : &lt;a href="https://github.com/yashwanth2804/TickerSymbol"&gt;https://github.com/yashwanth2804/TickerSymbol&lt;/a&gt; &lt;br&gt;&lt;br&gt;
Demo : &lt;a href="https://tickersearch.surge.sh/"&gt;https://tickersearch.surge.sh/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7H3nzqGO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.steemitimages.com/DQmTB3rTvr1zv4D2A1NgZpjbTbGunGT1dYCkfNF42X3uCXc/facebook.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7H3nzqGO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.steemitimages.com/DQmTB3rTvr1zv4D2A1NgZpjbTbGunGT1dYCkfNF42X3uCXc/facebook.png" alt="facebook.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  In order to get the required search result , please provide &lt;code&gt;KEYWORD_SEARCH&lt;/code&gt; in the following url
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;https://ticker-2e1ica8b9.now.sh//keyword/KEYWORD_SEARCH&lt;/code&gt;&lt;br&gt;
 eg : &lt;code&gt;https://ticker-2e1ica8b9.now.sh/keyword/googl&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  output
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;[{"symbol":"GOOGL","name":"Alphabet Inc."}]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Pros&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free Free Free&lt;/li&gt;
&lt;li&gt;No API key mess , No email spamming&lt;/li&gt;
&lt;li&gt;Nothing more Nothing less&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Weired API end point url &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Technology Stack
&lt;/h2&gt;

&lt;p&gt;1) NodeJS&lt;br&gt;
2) Hosted on ZEIT ,with 100GB bandwidth and 3 instances available&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>api</category>
      <category>stock</category>
    </item>
    <item>
      <title>New Feature Request</title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Fri, 04 Oct 2019 12:37:06 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/new-feature-request-5gn0</link>
      <guid>https://forem.com/yashwanth2804/new-feature-request-5gn0</guid>
      <description>&lt;p&gt;Recently I came across a good blog post,after that I bookmarked(browser) to some folder , like I being a unorganized guy I don't follow a pattern,now I can't able to remember which folder I saved to .I find it hard to browse my fav url among my home-pc,office-pc and mobile.&lt;/p&gt;

&lt;p&gt;Just like Pintrest may be devs also can share and pin urls.&lt;/p&gt;


&lt;div class="ltag_github-liquid-tag"&gt;
  &lt;h1&gt;
    &lt;a href="https://github.com/thepracticaldev/dev.to/issues/4231"&gt;
      &lt;img class="github-logo" alt="GitHub logo" src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg"&gt;
      &lt;span class="issue-title"&gt;
        Bookmark internet urls like pintrest
      &lt;/span&gt;
      &lt;span class="issue-number"&gt;#4231&lt;/span&gt;
    &lt;/a&gt;
  &lt;/h1&gt;
  &lt;div class="github-thread"&gt;
    &lt;div class="timeline-comment-header"&gt;
      &lt;a href="https://github.com/yashwanth2804"&gt;
        &lt;img class="github-liquid-tag-img" src="https://res.cloudinary.com/practicaldev/image/fetch/s--FPenZOVh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://avatars1.githubusercontent.com/u/8038593%3Fv%3D4" alt="yashwanth2804 avatar"&gt;
      &lt;/a&gt;
      &lt;div class="timeline-comment-header-text"&gt;
        &lt;strong&gt;
          &lt;a href="https://github.com/yashwanth2804"&gt;yashwanth2804&lt;/a&gt;
        &lt;/strong&gt; posted on &lt;a href="https://github.com/thepracticaldev/dev.to/issues/4231"&gt;&lt;time&gt;Oct 04, 2019&lt;/time&gt;&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag-github-body"&gt;
      &lt;p&gt;&lt;strong&gt;Is your feature request related to a problem? Please describe.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is not related to problem&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Describe the solution you'd like&lt;/strong&gt;
Just like Pinterest , provide an option for users to bookmarks urls,(blogs, tutorials, their own sites).
&lt;strong&gt;Implemetations&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;private/ public bookmarks&lt;/li&gt;
&lt;li&gt;one can explore some otherusers' bookmarks list&lt;/li&gt;
&lt;li&gt;showing recomendations/related site urls, if user bookmark an url&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Note: Not to be confused with existing bookmark functionality  for dev.to site posts only&lt;/em&gt;&lt;/p&gt;

    &lt;/div&gt;
    &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/thepracticaldev/dev.to/issues/4231"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>feature</category>
    </item>
    <item>
      <title>Need help dockerizing Spark</title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Mon, 02 Sep 2019 16:30:00 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/need-help-dockerizing-spark-2oc5</link>
      <guid>https://forem.com/yashwanth2804/need-help-dockerizing-spark-2oc5</guid>
      <description>&lt;p&gt;&lt;strong&gt;Need Help&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I have been working on docker,where I have to run the spark application.&lt;br&gt;
I tried using docker repository spark images but ran into issues, so I tried doing my own.&lt;/p&gt;

&lt;p&gt;It worked out but every run its downloading spark and i am losing previously ran job logs.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;My requirments&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Is it possible to have seperate spark image and supply app.jar to it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Instead of writing logs in docker can I direct it to host file system. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Docker file&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM alpine

ENV SPARK_VERSION=2.2.0
ENV HADOOP_VERSION=2.7

RUN apk add tar
RUN apk add aria2
RUN mkdir spark
RUN cd spark
WORKDIR /spark



#copy app.properties to docker
COPY app.properties .

# copy /home/exa9/SparkSubmit/App/target/App-0.0.1-SNAPSHOT.jar

ADD target/App-0.0.1-SNAPSHOT.jar app.jar


#Downloading Apache Spark and extracting

RUN aria2c -x16 http://archive.apache.org/dist/spark/spark-2.2.0/spark-2.2.0-bin-hadoop2.7.tgz

RUN apk add --no-cache curl bash openjdk8-jre \

      &amp;amp;&amp;amp; tar -xvzf spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz





WORKDIR /spark/spark-2.2.0-bin-hadoop2.7/bin
CMD ./spark-submit --class com.Spark.Test.SparkApp.App --master local[*]  /spark/app.jar /spark/app.properties






&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>help</category>
      <category>docker</category>
      <category>devops</category>
    </item>
    <item>
      <title>Different ways to word count in apache spark</title>
      <dc:creator>kambala yashwanth</dc:creator>
      <pubDate>Mon, 25 Feb 2019 08:41:39 +0000</pubDate>
      <link>https://forem.com/yashwanth2804/different-ways-to-word-count-in-apache-spark-1193</link>
      <guid>https://forem.com/yashwanth2804/different-ways-to-word-count-in-apache-spark-1193</guid>
      <description>&lt;h4&gt;
  
  
  Hi Big Data Devs,
&lt;/h4&gt;

&lt;p&gt;When it comes to provide an example for a big-data framework, WordCount program is like a hello world programme.The main reason it gives a snapshot of Map-shuffle-reduce for the beginners.Here I am providing different ways to achieve it&lt;/p&gt;

&lt;h2&gt;
  
  
  ReduceByKey (Transformation)
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Return type is same as input RDD type&lt;/em&gt;&lt;/p&gt;






&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JavaRDD&amp;lt;String&amp;gt; file = sc.textFile("/&amp;lt;Path_To_File&amp;gt;/README.md");

JavaRDD&amp;lt;String&amp;gt; words = file
.flatMap(f -&amp;gt; Arrays.asList(f.split(" ")).iterator())
.filter(f -&amp;gt; !f.isEmpty());

// grouping words with number 1
JavaPairRDD&amp;lt;String,Integer&amp;gt; wordMap_to_pair = words
.mapToPair(f -&amp;gt; new Tuple2&amp;lt;String,Integer&amp;gt;(f,1) );

//ReduceBykey,will merge at partition level and sends result to driver
JavaPairRDD&amp;lt;String,Integer&amp;gt; reducebyKey = wordMap_to_pair.reduceByKey((a,b) -&amp;gt; a+b);

System.out.println(reducebyKey.collect());
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  foldByKey (Transformation)
&lt;/h2&gt;




&lt;p&gt;It is similar to reeducebykey but takes the zeroValue.The user does not need to specify a combiner&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
JavaPairRDD&amp;lt;String, Integer&amp;gt; Foldbykey = wordMap_to_pair.foldByKey(0, ((acc, val) -&amp;gt; acc+val));

System.out.println(Foldbykey.collect());

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  aggregateByKey (Transformation)
&lt;/h2&gt;




&lt;p&gt;&lt;em&gt;Return type need not be same as input RDD type&lt;/em&gt;&lt;br&gt;
&lt;em&gt;parameters&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;initalValue&lt;/strong&gt; @primitive types. &lt;code&gt;0&lt;/code&gt; in Addition and subtraction , &lt;code&gt;1&lt;/code&gt; in multiplication /division , &lt;code&gt;[]&lt;/code&gt; on list ,&lt;code&gt;""&lt;/code&gt; on string&lt;br&gt;&lt;br&gt;
&lt;strong&gt;SequenceFunction&lt;/strong&gt; @operates within partition level ,&lt;br&gt;&lt;br&gt;
&lt;strong&gt;CombinerFunction&lt;/strong&gt; @operates across partition level&lt;br&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JavaPairRDD&amp;lt;String,Integer&amp;gt; aggreagteBykey = wordMap_to_pair.aggregateByKey(
0 // initial value
, ( (a,v) -&amp;gt; a+v ) //seq,counting operation within partition
, ( (a,v) -&amp;gt; a+v )); // merge, counting operation across partition

System.out.println( aggreagteBykey.collect());

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  CombineByKey (Transformation)
&lt;/h2&gt;




&lt;p&gt;The user can specify a combiner function and customize combining behavior unlike aggregate and fold bykeys.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Return type need not be same as input RDD type&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;parameters&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;createCombiner&lt;/strong&gt; @A function accepts current values and returns new value&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mergeValue&lt;/strong&gt; @merge/combine values within partition level&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mergeCombiners&lt;/strong&gt; @merge/combine values across partition level&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
wordMap_to_pair.combineByKey(
i -&amp;gt; i, //createCombiner
(a,v) -&amp;gt; (a+v) //mergeValue
,(a,b) -&amp;gt; a+b) //mergeCombiners
.collect()
.forEach(System.out::println);

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  groupByKey (Transformation)
&lt;/h2&gt;




&lt;p&gt;Returns a Tuple of key and collection of values.performs hash join across partitions&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
JavaPairRDD&amp;lt;String,Iterable&amp;lt;Integer&amp;gt;&amp;gt; groupByKey = wordMap_to_pair.groupByKey();

groupByKey
.mapValues( v -&amp;gt; Iterables.size(v)) // [1,1,1,1] -&amp;gt; [4]
.collect()
.forEach(System.out:println);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;






</description>
      <category>spark</category>
      <category>bigdata</category>
      <category>java</category>
      <category>wordcount</category>
    </item>
  </channel>
</rss>
