본문 바로가기
빅데이터/hadoop

[팁] hdfs 에 파일 업로드시 권한문제가 발생할 때 해결방법

by hs_seo 2016. 6. 16.

HDFS에 파일 업로드시에 권한문제가 발생하여 파일 업로드가 안 될 경우가 있다.


Permission denied: user=alice, access=WRITE, inode="staging":hduser:supergroup:rwxr-xr-x


보통 하둡에 설정된 사용자명과 현재 사용자 명이 달라서 발생하는 오류이다.

이럴때는 아래와 같이 하둡 사용자 명을 설정하여 해결한다.



<Java>

System.setProperty("HADOOP_USER_NAME", "hduser")


<shell>

export HADOOP_USER_NAME=<your hdfs user>





반응형