Running and Verifying Hadoop and Spark
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following commands to create a user directory in the HDFS:
cd path/to/HADOOP ./bin/hdfs dfs -mkdir -p /user/hadoop
The directories and files created by HDFS DFS operations can be identified only in Hadoop mode. They cannot be viewed by running the local ls command.
- Run the following commands to create the input directory and copy the files in etc/hadoop to the input directory:
hdfs dfs -mkdir -p input hdfs dfs -put ./etc/hadoop/*.xml input
- Run the following command to view the file list:
hdfs dfs -ls input
- Run the following command to stop Hadoop:
stop-dfs.sh
Parent topic: Hadoop 3.1.2 + Spark 2.4.4 Porting Guide (CentOS 7.6)