AWS EMR을 설정했습니다. 나는 마스터 노드에 SSH. hdfs 시스템에 파일을 복사하고 싶었습니다. 내 프로그램에서이 작은 코드 행은 다음과 같습니다.hadoop을 사용하기 위해 ec2 사용자 추가
os.system('/home/hadoop/bin/hdfs dfs -put %s PATH_to_HADOOP' % tmp_output)
내 hdfs 파일 시스템 경로를 입력하고 싶습니다.
http://cloudcelebrity.wordpress.com/2013/06/05/handling-permission-denied-error-on-hdfs/
하지만 작성 후 :
나는 나는 그래서,이 지침을 따라 하둡을 사용하는 EC2 사용자 추가
[[email protected] input]$ /home/hadoop/bin/hdfs dfs -mkdir /tmp/stockmarkets
mkdir: Permission denied: user=ec2-user, access=EXECUTE, inode="/tmp":hadoop:supergroup:drwxrwx---
[[email protected] input]$ /home/hadoop/bin/hdfs dfs -ls/
Found 2 items
drwxr-xr-x - hadoop supergroup 0 2014-04-14 22:21 /hbase
drwxrwx--- - hadoop supergroup 0 2014-04-14 22:19 /tmp
을 시도 할 (우분투를 ec2 사용자로 대체)
sudo adduser ec2-user hadoop
대신 추가 메시지를 받고, 나는 얻을 :
Usage: useradd [options] LOGIN
Options:
-b, --base-dir BASE_DIR base directory for the home directory of the
new account
-c, --comment COMMENT GECOS field of the new account
-d, --home-dir HOME_DIR home directory of the new account
-D, --defaults print or change default useradd configuration
-e, --expiredate EXPIRE_DATE expiration date of the new account
-f, --inactive INACTIVE password inactivity period of the new account
-g, --gid GROUP name or ID of the primary group of the new
account
-G, --groups GROUPS list of supplementary groups of the new
account
-h, --help display this help message and exit
-k, --skel SKEL_DIR use this alternative skeleton directory
-K, --key KEY=VALUE override /etc/login.defs defaults
-l, --no-log-init do not add the user to the lastlog and
faillog databases
-m, --create-home create the user's home directory
-M, --no-create-home do not create the user's home directory
-N, --no-user-group do not create a group with the same name as
the user
-o, --non-unique allow to create users with duplicate
(non-unique) UID
-p, --password PASSWORD encrypted password of the new account
-r, --system create a system account
-s, --shell SHELL login shell of the new account
-u, --uid UID user ID of the new account
-U, --user-group create a group with the same name as the user
-Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping
그래서> 도와주세요 ... 모든 혼란과 나사입니다 ....
이 간단한 해결책은 나를 일하게 만들었습니다. ec2 사용자로 처리하는 방법을 찾는 것이 좋을지라도. 그래서 며칠 동안 용출을 기다리고 대답을 받아 들일 것입니다 .. 그래도 고맙습니다. –
아마존의 문서에서 아마존은 다음과 같이 말할 것입니다 : 로그인 이름을 사용해야합니다. hadoop Amazon EMR 클러스터 노드에 연결하면 서버와 비슷한 오류가 발생하여 키 오류가 발생할 수 있습니다. http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-connect-master-node-ssh.html –