spark는 hdfs에서 데이터를 로드하기 때문에 로컬 파일 시스템이 아닌 hdfs에서 가져와야 한다.

다음은 hdfs에서 디렉토리를 생성하는 방법니다.

Hadoop is searching for an input path at /user/hduser/input. Hadoop also follows unix like tree structure. If you simply mention a directory input it will be taken as /user//input.

hadoop fs -mkdir -p /user/hduser/input

hadoop fs -put <datafile>  /user/hduser/input