Support Questions
Find answers, ask questions, and share your expertise

load file from remote machint to HDFS

Explorer

Hi Team,

Can anyone suggest how to load file from one remote machine(centos 7) to hadoop system using put command.

Thanks in advance!

1 REPLY 1

Re: load file from remote machint to HDFS

Super Collaborator

do you have the hdfs client installed on the remote machine and it has access via network to your cluster nodes? If yes all you need is

hdfs dfs -put localfile hdfs://nn.example.com/hadoop/hadoopfile

or

hdfs dfs -copyFromLocal

localfile hdfs://nn.example.com/hadoop/hadoopfile

Otherwise you have typically an edge node, where you first transfer the file to in a local file system (via scp or ftp etc.) and then use the hdfs command to put the file to hdfs on the edge node.