Windows user here. Will be a really simple answer, it must have been asked but I mustn't know the terminology to find the question here in Stack.
I'm trying to reference any file outside of the hadoop fs (hadoop filesystem?) on my Linux VM. An example is this:
hadoop fs -put home/udacity_training/data/access_logs.txt access_logs.txt
In the above call I'm trying to copy the file from the 'data' folder to my hadoop filesystem. However for every path I try reference I get 'no such file or directory' error. Even when trying to use 'copyFromLocal' like so:
hadoop fs -copyFromLocal access_logs.txt access_logs.txt
It doesn't work!
Any help will be massively appreciated.
With the following command
hadoop fs -put home/udacity_training/data/access_logs.txt access_logs.txt
You are telling hadoop
to copy access_logs.txt
from local file system to access_logs.txt directory
in hdfs
. What hadoop is doing is trying to find that directory inside home directory of the hadoop user
So you can create home directory of hadoop user
with which you are running hadoop commands
as
hadoop dfs -mkdir -f /user/Finn
I am assuming Finn
is the username
Then you apply
hadoop fs -put home/udacity_training/data/access_logs.txt /user/Finn/
You will see that access_logs.txt
should be copied
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加