Install hdfs clients¶
For linux¶
For linux, follow the below steps
- Download jdk (11 for hadoop 3.3.6), set up JAVA_HOME in your env var
- Download the hadoop bin, set up HADOOP_HOME in your env var
- add $HADOOP_HOME/bin, $JAVA_HOME/bin into your
path - configure the
hadoop-env.shwith the right java_home - copy the dfs url from the server
core-site.xmlto your localcore-site.xml, below is an example
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://name-node-url:9000</value>
</property>
</configuration>
Test your client
hdfs dfs -ls /
For windows¶
For windows, you need to do all the steps of the linux client.
Then you need to download the winutils for hadoop. You can go to this github page to download the binary
Extract the winuitls zip, the copy the winutils.exe, hadoop.dll and hdfs.dll binaries to your hadoop/bin
If your path is set up correctly, you should be able to run below command from a cmd windows
hdfs dfs -ls /