<?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 Am I able to copy a file from my mac (/Users/rev/geolocation.csv) to the HDFS (/tmp/admin/data) via SSH? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Am-I-able-to-copy-a-file-from-my-mac-Users-rev-geolocation/m-p/102046#M65006</link>
    <description>&lt;P&gt;Hi, I am interested in doing the HDP Certified Developer (HDPCD) Exam. As such I am doing some background work.
Within the link (http://hortonworks.com/training/class/hdp-certified-developer-hdpcd-exam/) there are a set of tasks that I was attempting.
The first task ‘Input a local file into HDFS using the Hadoop file system shell’ was one I attempted. I can do this via Ambari by going to the HDFS section and simply uploading the file by pressing the browse button and selecting the data file.
However I want to do this via command line. Is there anyway I can do this? &lt;/P&gt;&lt;P&gt;My data is stored on my mac /Users/rev/geolocation.csv. I have created a directory in HDFS located: tmp/admin/data. This is where I will copy the geolocation.csv to. &lt;/P&gt;&lt;P&gt;
Via SSH (http://127.0.0.1:4200/) I have tried commands like the one below which works fine. &lt;/P&gt;&lt;PRE&gt;hadoop fs -ls tmp/admin/data &lt;/PRE&gt;&lt;P&gt;However, when I type the below I get a no such file or directory message. &lt;/P&gt;&lt;PRE&gt;hadoop fs -put localfile /Users/rev/geolocation.csv /tmp/admin/data &lt;/PRE&gt;&lt;P&gt;Am I able to copy a file from my mac (/Users/rev/geolocation.csv) to the HDFS (/tmp/admin/data)? &lt;/P&gt;</description>
    <pubDate>Mon, 11 Jan 2016 09:54:13 GMT</pubDate>
    <dc:creator>Rebel</dc:creator>
    <dc:date>2016-01-11T09:54:13Z</dc:date>
    <item>
      <title>Am I able to copy a file from my mac (/Users/rev/geolocation.csv) to the HDFS (/tmp/admin/data) via SSH?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Am-I-able-to-copy-a-file-from-my-mac-Users-rev-geolocation/m-p/102046#M65006</link>
      <description>&lt;P&gt;Hi, I am interested in doing the HDP Certified Developer (HDPCD) Exam. As such I am doing some background work.
Within the link (http://hortonworks.com/training/class/hdp-certified-developer-hdpcd-exam/) there are a set of tasks that I was attempting.
The first task ‘Input a local file into HDFS using the Hadoop file system shell’ was one I attempted. I can do this via Ambari by going to the HDFS section and simply uploading the file by pressing the browse button and selecting the data file.
However I want to do this via command line. Is there anyway I can do this? &lt;/P&gt;&lt;P&gt;My data is stored on my mac /Users/rev/geolocation.csv. I have created a directory in HDFS located: tmp/admin/data. This is where I will copy the geolocation.csv to. &lt;/P&gt;&lt;P&gt;
Via SSH (http://127.0.0.1:4200/) I have tried commands like the one below which works fine. &lt;/P&gt;&lt;PRE&gt;hadoop fs -ls tmp/admin/data &lt;/PRE&gt;&lt;P&gt;However, when I type the below I get a no such file or directory message. &lt;/P&gt;&lt;PRE&gt;hadoop fs -put localfile /Users/rev/geolocation.csv /tmp/admin/data &lt;/PRE&gt;&lt;P&gt;Am I able to copy a file from my mac (/Users/rev/geolocation.csv) to the HDFS (/tmp/admin/data)? &lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2016 09:54:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Am-I-able-to-copy-a-file-from-my-mac-Users-rev-geolocation/m-p/102046#M65006</guid>
      <dc:creator>Rebel</dc:creator>
      <dc:date>2016-01-11T09:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Am I able to copy a file from my mac (/Users/rev/geolocation.csv) to the HDFS (/tmp/admin/data) via SSH?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Am-I-able-to-copy-a-file-from-my-mac-Users-rev-geolocation/m-p/102047#M65007</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2030/revlin.html" nodeid="2030" target="_blank"&gt;@Revlin Abbi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;via SSH, you first have to copy the files to the guest machine, (Sandbox) like so &lt;/P&gt;&lt;PRE&gt;scp -P 2222 -r file root@127.0.0.1:/home/guest&lt;/PRE&gt;&lt;P&gt;then when you ssh to the machine, the file will be in /home/guest directory&lt;/P&gt;&lt;P&gt;switch to guest user&lt;/P&gt;&lt;PRE&gt;su guest&lt;/PRE&gt;&lt;P&gt;if you do ls on the home directory you will see your file&lt;/P&gt;&lt;P&gt;now you need to upload the file to HDFS&lt;/P&gt;&lt;PRE&gt;hdfs dfs -put file /user/guest&lt;/PRE&gt;&lt;P&gt;now you can list the file in hdfs&lt;/P&gt;&lt;PRE&gt;hdfs dfs -ls /user/guest/&lt;/PRE&gt;&lt;P&gt;alternatively, you can use the Ambari HDFS Files view to upload directly from your mac to HDFS in Sandbox. The one thing you need to remember is that when you copy data from host to guest you copy to the guest's local filesystem. Loading to HDFS will take another step.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1277-screen-shot-2016-01-10-at-94841-pm.png" style="width: 558px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23728i7784AA68510D881D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1277-screen-shot-2016-01-10-at-94841-pm.png" alt="1277-screen-shot-2016-01-10-at-94841-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 12:17:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Am-I-able-to-copy-a-file-from-my-mac-Users-rev-geolocation/m-p/102047#M65007</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2019-08-19T12:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Am I able to copy a file from my mac (/Users/rev/geolocation.csv) to the HDFS (/tmp/admin/data) via SSH?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Am-I-able-to-copy-a-file-from-my-mac-Users-rev-geolocation/m-p/102048#M65008</link>
      <description>&lt;P&gt;Hi Artem, thank you for help.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2016 00:13:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Am-I-able-to-copy-a-file-from-my-mac-Users-rev-geolocation/m-p/102048#M65008</guid>
      <dc:creator>Rebel</dc:creator>
      <dc:date>2016-01-12T00:13:33Z</dc:date>
    </item>
  </channel>
</rss>

