Created 04-13-2017 08:10 AM
I've been trying to upload a basic txt file onto HDFS but it won't upload. I have tried multiple files of different sizes and extensions and found the reason to be the size of my text file (approx 150 bytes). All files over around 10kb seems to work fine... Does anyone have a solution to this ? Thanks
Kelvin
Created 04-13-2017 01:19 PM
Based on the screen shots you are providing, you are attempting to push the file to HDFS using the command line within the Sandbox itself. However, you are specifying a file path that is local to the computer running the VIrtualBox Sandbox VM. That won't work. The Sandbox has no way of knowing how to access "C:\".
You must first push the file to the Sandbox using WinSCP. Then you can use the hdfs dsfs -put command using a local directory within the Sandbox (something like /root/<my filename>).
Created 04-13-2017 08:14 AM
What error it throws? Thanks.
Created 04-13-2017 08:24 AM
there isn't a specific error. Usually when I drag and drop a file onto the cloud icon, it quickly uploads. But when i drag and drop my txt files there is no response. I have seen other people successfully upload files of less than 1kb on youtube so I know it is possible. I just don't know why mine isn't working
Created 04-13-2017 08:25 AM
Created 04-13-2017 08:48 AM
Can you try manually uploading the file from CLI using the below command?
hdfs dfs -copyFromLocal <localsrc> URI
OR
hdfs dfs -put <localsrc> ... <dst> Eg: hdfs dfs -put localfile /user/hadoop/hadoopfile
Created on 04-13-2017 09:04 AM - edited 08-17-2019 11:10 PM
@Ram Charan Tej
I've tried that but i keep getting the error as shown below:
Am i just typing my file path wrong ? As you can see I'm trying to upload 'booth1.txt'
Thanks for your help !
Created 04-13-2017 11:19 AM
Can you remove the backslash before the "\"C:\users 1. 'L' is caps for 'Local' not small letter, so it is hdfs dfs -copyFromLocal <source> hdfs://<URI> 2. you have to remove backslash before "C" drive and try !
Created on 04-13-2017 12:51 PM - edited 08-17-2019 11:09 PM
Hello, I've tried it but it still doesn't work for me. Sorry I'm pretty new to this so if possible could you type out exactly what
I should be typing ?? Thanks heaps ! The error I'm getting is shown below:
Created 04-13-2017 01:07 PM
Are you trying to copy the file from windows to hadoop? I think the file which you are trying to be copied should be present in the server on which hadoop is installed..
Created 04-13-2017 01:19 PM
Yes, the file is currently on windows. How do i put it on the server ? My host is 127.0.0.1