<?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: Error while submitting PySpark Application through Livy REST API in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Error-while-submitting-PySpark-Application-through-Livy-REST/m-p/287581#M213125</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71289"&gt;@TVGanesh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Isn't the Pyspark file expected in hdfs if using YARN instead of LOCAL? What is the configuartion of your livy.conf if you dont have it in place do the following.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
"pyFiles": ["/user/tvganesh/test1.py"]
}&lt;/LI-CODE&gt;&lt;P&gt;Copy the template file is rename it by stripping off .template in livy.conf.template.Then make sure that the following configurations are present in it. Make sure that forward slash is present in the end of the path. py files you should add the test1.py to hdfs and point to the hdfs location instead of from file system level since that won't be present for Livy locally.&lt;/P&gt;&lt;P&gt;Go to the the livy conf directory&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cp /usr/hdp/3.1.0.0-78/etc/livy2/conf.dist/conf&amp;nbsp;&lt;/STRONG&gt;then copy &lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;livy.conf.template&lt;/FONT&gt; &lt;/STRONG&gt;to&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt; livy.conf&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Check the below parameters and set them accordingly&lt;/P&gt;&lt;P&gt;# What spark master Livy sessions should use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;livy.spark.master = local&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# What spark deploy mode Livy sessions should use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;livy.spark.deploy-mode =&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Whether to enable HiveContext in livy interpreter, if it is true hive-site.xml will be detected&lt;BR /&gt;# on user request and then livy server classpath automatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;livy.repl.enable-hive-context =&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# List of local directories from where files are allowed to be added to user sessions. By&lt;BR /&gt;# default it's empty, meaning users can only reference remote URIs when starting their&lt;BR /&gt;# sessions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;livy.file.local-dir-whitelist =&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For local execution&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;livy.spark.master = local
livy.file.local-dir-whitelist =/home/tvganesh/ LOCAL&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For YARN execution&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;livy.spark.master = yarn
livy.file.local-dir-whitelist =/user/tvganesh/ HDFS&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please do that and revert&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jan 2020 09:42:54 GMT</pubDate>
    <dc:creator>Shelton</dc:creator>
    <dc:date>2020-01-14T09:42:54Z</dc:date>
  </channel>
</rss>

