2014-06-20 6 views
0

Hadoop 스트리밍을 사용하여 파이썬에서 Mapleduce 작업을 실행하기 위해 내 매퍼 및 감속기 코드를 사용하고 있습니다. s3에 데이터를 입력했는데 그 데이터를 작업에 사용하려고합니다. 그러나, 나는 다음과 같은 명령을 실행할 때 ->Hadoop EMR with Python

bin/hadoop jar contrib/streaming/hadoop-*streaming*.jar -file aish1/mapperi.py 
-mapper aish1/mapperi.py -file aish1/reduceri.py -reducer aish1/reduceri.py 
-file s3://INLOCATION -input s3://INLOCATION -output s3://OUTLOCATION 

내가 오류 얻을 : 내 S3의 앞 /은/가정/하둡을 추가 왜 이해가 안

File: /home/hadoop/s3:/INLOCATION does not exist, or is not readable. 
Streaming Command Failed! 

을 INLOCATION. 어떤 도움이라도 대단히 감사하겠습니다!

답변

2

input에 대한 -file 준비를 사용하지 마십시오. 로컬 파일 시스템에서 파일을 사용하려면 인수 -file을 사용해야하므로 Hadoop이 로컬 파일 시스템을 HDFS에 업로드합니다. 당신의 경우 입력은 이미 적절한 위치에 있습니다.

변경 당신은 invokation : 당신의 도움에 대한

bin/hadoop jar contrib/streaming/hadoop-*streaming*.jar -file aish1/mapperi.py
-mapper aish1/mapperi.py -file aish1/reduceri.py -reducer aish1/reduceri.py -input s3://INLOCATION -output s3://OUTLOCATION

+0

감사합니다! – aishpr