From 9f352fc9197f18986c149e009c74727422b749e1 Mon Sep 17 00:00:00 2001 From: ruitianzhong Date: Fri, 31 May 2024 13:21:57 +0800 Subject: [PATCH] add init command in README.md --- map-reduce/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/map-reduce/README.md b/map-reduce/README.md index 5c8671d..61b5e1e 100644 --- a/map-reduce/README.md +++ b/map-reduce/README.md @@ -111,8 +111,16 @@ Set the key class for the job output data. ### Using Hadoop Distributed File System +initialization: + +```shell +bin/hdfs namenode -format +sbin/start-dfs.sh +``` + ```shell -hadoop fs -mkdir /home/{your user name on Linux} +hadoop fs -mkdir /user +hadoop fs -mkdir /user/{your user name on Linux} hadoop fs -mkdir test_data hadoop fs -put ./data/grades.txt test_data hadoop fs -put ./data/child-parent.txt test_data