<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Livy rest api with web app in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Livy-rest-api-with-web-app/m-p/141590#M52224</link>
    <description>&lt;P&gt;The flow seems right. Thats a good use case for livy. Assuming it goes YourApp-&amp;gt;Livy-&amp;gt;Spark and back. &lt;/P&gt;&lt;P&gt;You will need to look at Livy client logs or livy logs for session id 339. Seems like the client is asking for a session (livy spark job) that does not exist anymore. Could have been not started and abandoned or lost.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2017 03:54:04 GMT</pubDate>
    <dc:creator>bikas</dc:creator>
    <dc:date>2017-01-24T03:54:04Z</dc:date>
    <item>
      <title>Livy rest api with web app</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Livy-rest-api-with-web-app/m-p/141589#M52223</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a requirement to train a predictive machine learning model from web application. User can change tuning parameters/ algorithm from User Interface which goes to Spark job and returns regression metric. &lt;/P&gt;&lt;P&gt;Right now, I have developed a web application REST API with Jersey and Jetty. &lt;/P&gt;&lt;P&gt;I have a Spark machine learning application which implements Livy job. I am referring this jar from web application.&lt;/P&gt;&lt;P&gt;The flow is as follows. User changes tuning parameter/ algorithm from UI -&amp;gt; Jersey API calls Livy client with parameters -&amp;gt; Livy job runs in YARN and returns metric results -&amp;gt; Jersey returns metric results to UI.&lt;/P&gt;&lt;P&gt;Am I doing it correct? Is there any other way that I can interact with SPARK from web app? I am creating LivyClient singleton object and I am using this object for submitting job throughout the application. The code was working fine. I am getting the below exception now. Do I have to create LivyClient object and upload jar (Spark machine learning application with Livy) each and every time?&lt;/P&gt;&lt;P&gt; javax.servlet.ServletException: java.util.concurrent.ExecutionException: java.io.IOException: Not Found: "Session '339' not found."&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 08:58:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Livy-rest-api-with-web-app/m-p/141589#M52223</guid>
      <dc:creator>lalitha_ramakri</dc:creator>
      <dc:date>2017-01-23T08:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Livy rest api with web app</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Livy-rest-api-with-web-app/m-p/141590#M52224</link>
      <description>&lt;P&gt;The flow seems right. Thats a good use case for livy. Assuming it goes YourApp-&amp;gt;Livy-&amp;gt;Spark and back. &lt;/P&gt;&lt;P&gt;You will need to look at Livy client logs or livy logs for session id 339. Seems like the client is asking for a session (livy spark job) that does not exist anymore. Could have been not started and abandoned or lost.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 03:54:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Livy-rest-api-with-web-app/m-p/141590#M52224</guid>
      <dc:creator>bikas</dc:creator>
      <dc:date>2017-01-24T03:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Livy rest api with web app</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Livy-rest-api-with-web-app/m-p/141591#M52225</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/462/bikas.html" nodeid="462"&gt;@Bikas&lt;/A&gt;, Is this correct to create LivyClient object during application start up and use that object for all the API requests to submit jar?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 08:31:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Livy-rest-api-with-web-app/m-p/141591#M52225</guid>
      <dc:creator>lalitha_ramakri</dc:creator>
      <dc:date>2017-01-24T08:31:23Z</dc:date>
    </item>
  </channel>
</rss>

