Pergunta

I am trying to write a EMR mapper in ruby, however I am unclear what parameter the file from the S3 bucket would be passed in as. My current code just uses:

require 'optparse'

options = {}
opts.parse(ARGV)
...
inputFile = options[:input]
mode = options[:mode]
downloadPrefix = options[:prefix]

However, this job fails when I try to create a test workflow through the aws console. So my question is, how does EMR pass the input parameter to the mapper script for ruby?

Foi útil?

Solução

It uses STDIN, so:

STDIN.each_line do |line|
   puts line
end
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top