<?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 How to properly execute spark-submit command with Yarn? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176678#M77927</link>
    <description>&lt;P&gt;
	I should execute `spark-submit` in the Hadoop cluster created with Ambari. There are 3 instances: 1 master node and 2 executer nodes.&lt;/P&gt;&lt;P&gt;
	So, I logged in the master node as `centos` user and executed this command:&lt;/P&gt;
&lt;PRE&gt;sudo -u hdfs spark-submit --master yarn --deploy-mode cluster --driver-memory 6g  --executor-memory 4g --executor-cores 2 --class org.tests.GraphProcessor graph.jar&lt;/PRE&gt;&lt;P&gt;
	But I got the error message that the file graph.jar does not exist. Therefore I tried to copy this file to HDFS as follows: &lt;/P&gt;&lt;PRE&gt;hdfs dfs -put graph.jar /home/hdfs/tmp&lt;/PRE&gt;&lt;P&gt;However, the error is: &lt;/P&gt;&lt;PRE&gt;No such file or directory: `hdfs://eureambarimaster1.local.eurecat.org:8020/home/hdfs/tmp'&lt;/PRE&gt;</description>
    <pubDate>Fri, 04 May 2018 18:36:02 GMT</pubDate>
    <dc:creator>liana_napalkova</dc:creator>
    <dc:date>2018-05-04T18:36:02Z</dc:date>
    <item>
      <title>How to properly execute spark-submit command with Yarn?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176678#M77927</link>
      <description>&lt;P&gt;
	I should execute `spark-submit` in the Hadoop cluster created with Ambari. There are 3 instances: 1 master node and 2 executer nodes.&lt;/P&gt;&lt;P&gt;
	So, I logged in the master node as `centos` user and executed this command:&lt;/P&gt;
&lt;PRE&gt;sudo -u hdfs spark-submit --master yarn --deploy-mode cluster --driver-memory 6g  --executor-memory 4g --executor-cores 2 --class org.tests.GraphProcessor graph.jar&lt;/PRE&gt;&lt;P&gt;
	But I got the error message that the file graph.jar does not exist. Therefore I tried to copy this file to HDFS as follows: &lt;/P&gt;&lt;PRE&gt;hdfs dfs -put graph.jar /home/hdfs/tmp&lt;/PRE&gt;&lt;P&gt;However, the error is: &lt;/P&gt;&lt;PRE&gt;No such file or directory: `hdfs://eureambarimaster1.local.eurecat.org:8020/home/hdfs/tmp'&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 May 2018 18:36:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176678#M77927</guid>
      <dc:creator>liana_napalkova</dc:creator>
      <dc:date>2018-05-04T18:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly execute spark-submit command with Yarn?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176679#M77928</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/70685/liananapalkova.html" nodeid="70685"&gt;@Liana Napalkova&lt;/A&gt; The graph.jar will be automatically copied to hdfs and distribute by the spark client. You only need to point to the location of graph.jar in the local file system. For example:&lt;/P&gt;&lt;P&gt;spark-submit --master yarn --deploy-mode cluster --driver-memory 6g--executor-memory 4g--executor-cores 2--class org.tests.GraphProcessor /path/to/graph.jar&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 19:48:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176679#M77928</guid>
      <dc:creator>falbani</dc:creator>
      <dc:date>2018-05-04T19:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly execute spark-submit command with Yarn?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176680#M77929</link>
      <description>&lt;PRE&gt;If I do this way (with "sudo -u hdfs"), the jar file is invisible for hdfs user (I get an error message)). But if I run without "sudo -u hdfs", then yarn mode cannot be entered. I think that it's the matter of permissions. But it's not clear to me how to solve this issue in a most correct way. Thanks.&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 May 2018 21:43:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176680#M77929</guid>
      <dc:creator>liana_napalkova</dc:creator>
      <dc:date>2018-05-04T21:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly execute spark-submit command with Yarn?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176681#M77930</link>
      <description>&lt;P&gt;In particular, if I do this way, I get the following error: Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission denied: user=centos, access=WRITE, inode="/user/centos/.sparkStaging/application_1523903913760_0007":hdfs:hdfs:drwxr-xr-x&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 23:56:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176681#M77930</guid>
      <dc:creator>liana_napalkova</dc:creator>
      <dc:date>2018-05-04T23:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly execute spark-submit command with Yarn?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176682#M77931</link>
      <description>&lt;P&gt;I had to run this command to adjust permissions:&lt;/P&gt;&lt;PRE&gt;sudo -u hdfs hdfs dfs -chown centos:centos /user&lt;/PRE&gt;&lt;P&gt;After this I was able to run:&lt;/P&gt;&lt;PRE&gt;spark-submit --master yarn --deploy-mode cluster --driver-memory 6g--executor-memory 4g--executor-cores 2--class org.tests.GraphProcessor /path/to/graph.jar&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 May 2018 00:01:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176682#M77931</guid>
      <dc:creator>liana_napalkova</dc:creator>
      <dc:date>2018-05-05T00:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly execute spark-submit command with Yarn?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176683#M77932</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/70685/liananapalkova.html" nodeid="70685"&gt;@Liana Napalkova&lt;/A&gt; I advice against changing ownership of hdfs /usr directory&lt;/P&gt;&lt;P&gt;You should set correct permissions for /user/centos directory. &lt;/P&gt;&lt;P&gt;hdfs dfs -chown centos:centos /user/centos&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 00:10:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176683#M77932</guid>
      <dc:creator>falbani</dc:creator>
      <dc:date>2018-05-05T00:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly execute spark-submit command with Yarn?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176684#M77933</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/70685/liananapalkova.html" nodeid="70685"&gt;@Liana Napalkova&lt;/A&gt; &lt;/P&gt;&lt;P&gt;You should set correct permissions for /user/centos directory.&lt;/P&gt;&lt;P&gt;hdfs dfs -chown centos:centos /user/centos&lt;/P&gt;&lt;P&gt;If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 00:15:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-properly-execute-spark-submit-command-with-Yarn/m-p/176684#M77933</guid>
      <dc:creator>falbani</dc:creator>
      <dc:date>2018-05-05T00:15:15Z</dc:date>
    </item>
  </channel>
</rss>

