Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Cannot find files copied to Sandbox from Windows

avatar
Contributor

Hello.. I used PuTTy's pscp command to copy a file (Windows 10) to my Sandbox (HDP 2.5, hosted on VMWare Workstation 12). The copy looked sucessfull

11911-copy-pscp.png

But i cannot find the file anywhere in the system - i used the command line (PuTTy) as well as Ambari Web interfac; couldnt find it at all.

11912-folder-structure.png

Praskutti is a folder i created in /user/ and in the /root , but cant find the file in neither.

Can you guys help me where//how to find the files?

1 ACCEPTED SOLUTION

avatar
Super Guru

@Prasanna G

I think you are copying in your local file system and looking in your HDFS. Check your local tmp folder. Also, your full command is invisible but I am assuming its something like below:

pscp -P 2222 C:\Users\prgovind\Downloads\f.txt root@localhost:///tmp

Is that right? I think you first need to copy to local tmp folder on your sand box and then push it into HDFS. Try following:

pscp -P 2222 C:\Users\prgovind\Downloads\f.txt root@sandbox:/tmp

ssh root@sandbox

hdfs dfs -put /tmp/f.txt /user/praskutti

View solution in original post

6 REPLIES 6

avatar
Super Guru

@Prasanna G

I think you are copying in your local file system and looking in your HDFS. Check your local tmp folder. Also, your full command is invisible but I am assuming its something like below:

pscp -P 2222 C:\Users\prgovind\Downloads\f.txt root@localhost:///tmp

Is that right? I think you first need to copy to local tmp folder on your sand box and then push it into HDFS. Try following:

pscp -P 2222 C:\Users\prgovind\Downloads\f.txt root@sandbox:/tmp

ssh root@sandbox

hdfs dfs -put /tmp/f.txt /user/praskutti

avatar
Contributor

In essence, how do i query/distinguish local Sandbox file system and hdfs file system? I put the following queries in PuTTy, but it doesnt return anything

hadoop fs -ls /tmp <--doenst show the file

hdfs dfs -ls /tmp <-- shows the file

Am i missing something?

avatar
Super Guru

@Prasanna G

your putty is an ssh client and not an hdfs client. once you ssh to your sandbox, then you are able to run hdfs command because sandbox is where HDFS is installed including on your shell commands. This is simialr to the fact that you cannot run "ls /some directory" from putty before you ssh into the box.

avatar
Contributor

Thank you qureshi. This solved my issue.

Is there any documentation on the HortonWorks Sandbox File Sytem? I understand hadoop/hdfs file system are differenct from your response, but is there a clearer documentation on how to navigate around the file system within the Sandbox?

avatar
Super Guru

@Prasanna G

All documentation for sandbox is right here which I think you are aware of. As for which file system, I have never verified but I would think it is standard linux file system like ext4. Just type "mount" command without any parameters and it will show you the mounted file systems and their types.

http://hortonworks.com/hadoop-tutorial/learning-the-ropes-of-the-hortonworks-sandbox/

avatar

I would suggest check out this tutorial series on HDFS:

http://hortonworks.com/hadoop-tutorial/using-commandline-manage-files-hdfs/