Created on 01-30-2017 11:57 PM - edited 08-18-2019 05:39 AM
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
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.
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?
Created 01-31-2017 02:15 AM
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
Created 01-31-2017 02:15 AM
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
Created 01-31-2017 02:45 AM
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?
Created 01-31-2017 04:55 PM
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.
Created 01-31-2017 02:42 AM
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?
Created 01-31-2017 03:00 AM
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/
Created 01-31-2017 03:19 PM
I would suggest check out this tutorial series on HDFS:
http://hortonworks.com/hadoop-tutorial/using-commandline-manage-files-hdfs/