Amazon Elastic Mapreduce を使用する場合、Hadoop ストリーミングには Elastic Mapreduce のストリーミングではなく、Using hadoop-streaming-0.20.205.0.jar を使用したいと考えています。カスタム パーティショナー、入力形式、出力形式などを設計する必要があります。
そこで、次のように新しいカスタム JAR ジョブを作成しようとしました
JAR Location: stt.streaming/hadoop-streaming-0.20.205.0.jar
JAR Arguments:
-input s3n://stt.streaming/test_input
-output s3n://stt.streaming/test_output
-mapper s3n://stt.streaming/mapper.py
-reducer s3n://stt.streaming/reducer.py
Python スクリプト mapper.py と reducer.py は、EMR のストリーム ジョブを使用して問題なく実行されました。
ただし、次のエラーメッセージが表示されました
java.io.IOException: Cannot run program "s3n://stt.streaming/mapper.py": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:166)
at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
...
...
私の質問のポイントは
- 私の仕事に潜在的な問題はありますか?mapper.py と reducer.py にアクセスしたときにジョブが失敗したため、どの問題が残っているかわかりません。
- mapper.py と reducer.py にアクセスするにはどうすればよいですか?
- EMR のストリーミング ジョブは /home/hadoop/contrib/streaming/hadoop-streaming.jar を使用しているようです。このソースを入手できますか?このソースを入手すれば、私の問題は解決できます。ありがとう。