<?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: How to upload .jar file to hdfs and execute the jar using HDP-Oracle Virtual VM in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224065#M66971</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thanks for quick response&lt;/P&gt;&lt;P&gt;I have jar in my local directory at F:/dev/jars/sparktest.jar  and I would like to move to maria_dev directory which is present in hdfs.&lt;/P&gt;&lt;PRE&gt;$hdfs dfs F:/dev/jars sparktest.jar /user/maria_dev&lt;/PRE&gt;&lt;P&gt;I tried the above command it is not working&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2017 10:21:41 GMT</pubDate>
    <dc:creator>merugu_amithesh</dc:creator>
    <dc:date>2017-08-22T10:21:41Z</dc:date>
    <item>
      <title>How to upload .jar file to hdfs and execute the jar using HDP-Oracle Virtual VM</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224063#M66969</link>
      <description>&lt;P&gt;I have created a simple java+spark project to read and perform a calculation on JavaRDD. I have setup HDP-Oracle VM on my machine.My question is where to upload .jar(ex: Aambari file view) and execute the jar&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2017 14:17:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224063#M66969</guid>
      <dc:creator>merugu_amithesh</dc:creator>
      <dc:date>2017-08-20T14:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload .jar file to hdfs and execute the jar using HDP-Oracle Virtual VM</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224064#M66970</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/38163/meruguamithesh.html"&gt;Amithesh Merugu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It can be local or you can upload to hdfs but to do that you need maybe to create your home directory in&lt;STRONG&gt; /user &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As root switch to hdfs user &lt;/P&gt;&lt;PRE&gt;# su - hdfs&lt;/PRE&gt;&lt;P&gt;check existing directories &lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -ls / &lt;/PRE&gt;&lt;P&gt;Make a home directory for your user (toto) &lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -mkdir /user/toto &lt;/PRE&gt;&lt;P&gt;Change ownership &lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -chown toto:hdfs /user/toto &lt;/PRE&gt;&lt;P&gt;Copy your jar to hdfs imagining the jars are in your local home directory /home/toto/test.jar &lt;/P&gt;&lt;P&gt;As hdfs user while in your &lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -CopyFromLocal test.jar /user/toto&lt;/PRE&gt;&lt;P&gt;Now you can execute it from hdfs by passing the paths to the input and output directories in HDFS.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2017 16:41:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224064#M66970</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-08-20T16:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload .jar file to hdfs and execute the jar using HDP-Oracle Virtual VM</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224065#M66971</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thanks for quick response&lt;/P&gt;&lt;P&gt;I have jar in my local directory at F:/dev/jars/sparktest.jar  and I would like to move to maria_dev directory which is present in hdfs.&lt;/P&gt;&lt;PRE&gt;$hdfs dfs F:/dev/jars sparktest.jar /user/maria_dev&lt;/PRE&gt;&lt;P&gt;I tried the above command it is not working&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 10:21:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224065#M66971</guid>
      <dc:creator>merugu_amithesh</dc:creator>
      <dc:date>2017-08-22T10:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload .jar file to hdfs and execute the jar using HDP-Oracle Virtual VM</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224066#M66972</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/38163/meruguamithesh.html" nodeid="38163"&gt;@Amithesh Merugu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you want to copy a File "F:/dev/jars sparktest.jar" from your local file system to the HDFS location "/user/maria_dev" then you will need the following:&lt;/P&gt;&lt;P&gt;1.  Switch to "hdfs" user ( OR else you will have to login to the shell as "maria_dev" to wrtie inside the user directory Or any username who has write access insie the "/user/maria_dev" directory&lt;/P&gt;&lt;PRE&gt;# su - hdfs&lt;/PRE&gt;&lt;P&gt;2. Now you can use the "&lt;STRONG&gt;put&lt;/STRONG&gt;" switch to place the file with dfs command as following:&lt;/P&gt;&lt;PRE&gt;# hdfs dfs -put F:/dev/jars sparktest.jar /user/maria_dev&lt;/PRE&gt;&lt;P&gt;3. Now you should be able to list the file:&lt;/P&gt;&lt;PRE&gt;# hdfs dfs -ls /user/maria_dev&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 11:04:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224066#M66972</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-08-22T11:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload .jar file to hdfs and execute the jar using HDP-Oracle Virtual VM</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224067#M66973</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/38163/meruguamithesh.html"&gt;@Amithesh Merugu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It seems there is a confusion here is the F:  Linux directory? . The designation looks a window directory if so then copy using winscp /FileZilla  to you  /tmp on the on the sandbox or linux box first. &lt;/P&gt;&lt;P&gt;As root switch to hdfs user&lt;/P&gt;&lt;PRE&gt;# su - hdfs&lt;/PRE&gt;&lt;P&gt;Make sure the permission are correct on the /user/maria_dev   check the owner &lt;/P&gt;&lt;PRE&gt;$hdfs dfs -ls /user/maria_dev&lt;/PRE&gt;&lt;P&gt;The output should give the owner to spark eg  maria_dev&lt;/P&gt;&lt;PRE&gt;drwxr-xr-x - maria_dev hdfs 0 2017-08-08 23:55 /user/maria_dev&lt;/PRE&gt;&lt;P&gt;Now copy the file to the hdfs directory as  the hdfs user &lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -CopyFromLocal /tmp/sparktest.jar /user/toto&lt;/PRE&gt;&lt;P&gt;Now the file should be available in hdfs you can  list the file:&lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -ls /user/maria_dev&lt;/PRE&gt;&lt;P&gt;Now you can run your spark job as see the progress in the YARN UI choose running on the left pane &lt;/P&gt;&lt;PRE&gt;&lt;A href="http://ambari_host:8088/cluster" target="_blank"&gt;http://ambari_host:8088/cluster&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Hope that helps &lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 12:25:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224067#M66973</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-08-22T12:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload .jar file to hdfs and execute the jar using HDP-Oracle Virtual VM</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224068#M66974</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/38163/meruguamithesh.html"&gt;@Amithesh Merugu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Any feeback?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 05:34:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224068#M66974</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-08-23T05:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload .jar file to hdfs and execute the jar using HDP-Oracle Virtual VM</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224069#M66975</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Perfect!.It worked for me, I used WinSCP to upload the jar to tmp folder.And using -CopyFromLocal command moved the jar from tmp to the maria_dev user and able execute the jar.&lt;/P&gt;&lt;P&gt;Thanks a lot for quick response&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 10:33:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-upload-jar-file-to-hdfs-and-execute-the-jar-using-HDP/m-p/224069#M66975</guid>
      <dc:creator>merugu_amithesh</dc:creator>
      <dc:date>2017-08-23T10:33:54Z</dc:date>
    </item>
  </channel>
</rss>

