spark
windows10 에 hdfs 설치하기
wefree
2021. 7. 10. 21:05
https://blog.naver.com/PostView.nhn?isHttpsRedirect=true&blogId=gladiator67&logNo=222106281290
Windows 10에서 Hadoop 3.3 설치
1. 아래 사이트에서 hadoop 3.3 binary을 내려받는다. https://hadoop.apache.org/releases.html Apache ...
blog.naver.com
설치 후 아래처럼 root 를 public 으로 만들어 http://localhost:9870/explorer.html#/ 를 통해 자유롭게 파일을 업로드 할 수 있도록 한다.
hdfs dfs -chmod -R 777 /
http://localhost:9870/explorer.html#/ 이외에 windows CMD 창에서도 아래처럼 파일을 local hdfs 에 업로드 할 수 있다.
hdfs dfs -put c:\temp\test.txt /.
spark program 에서는 아래 처럼 local hdfs 에 있는 파일에 접근할 수 있다.
spark.read.textFile("hdfs://localhost:9000/test.txt")