From ceaf470df4ef299af6f2485c22e1f6176a1d0cb1 Mon Sep 17 00:00:00 2001 From: fly6516 Date: Wed, 16 Apr 2025 09:46:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(3-1):=20=E6=9B=B4=E6=96=B0=20HDFS=20?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 HDFS 地址从 "hdfs:///user/root/output/inverted_index" 修改为 "hdfs://master:9000/user/root/output/inverted_index" - 这个修改可能是为了适应不同的 HDFS集群配置,确保数据保存到正确的地址 --- 3-1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3-1.py b/3-1.py index 48a8157..c8f5062 100644 --- a/3-1.py +++ b/3-1.py @@ -61,6 +61,6 @@ if __name__ == "__main__": .mapValues(lambda ids: list(set(ids))) # 输出(可保存到 HDFS) - inverted_index.saveAsTextFile("hdfs:///user/root/output/inverted_index") + inverted_index.saveAsTextFile("hdfs://master:9000/user/root/output/inverted_index") sc.stop()