Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon Elastic Map Reduce : Listing job flows in command line tools Issue?

I'm new to Amazon web services, I'm trying to run job flows on Amazon elastic map reduce jobs using command line interface tools.

I followed the steps from amazon developer guide of this developer guide from aws.But things are not getting clear to me.

If I execute the command ./elastic-mapreduce --list to list the job flows. Shows the Following error.

/home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/httpdestinationhandler.rb:23: warning: else without rescue is useless
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/httpdestinationhandler.rb:19: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError)
/home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/httpdestinationhandler.rb:36: syntax error, unexpected keyword_end, expecting $end
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/awsquery.rb:6:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/service.rb:8:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/elasticmapreduceclient.rb:6:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/client.rb:6:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/commands.rb:7:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/elastic-mapreduce-cli.rb:5:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from ./elastic-mapreduce:6:in `<main>'

Thanks in Advance, and Can anyone Please tell me Why i am getting the above error while listing the job flows.

like image 586
Prabhu Avatar asked Mar 24 '23 02:03

Prabhu


2 Answers

check the avilable rvm, by using the following command

   $ rvm list

it will show:

   ruby-1.8.7-p374
   ruby-2.0.0-p247

then you should specifiy the rvm version, by using the following command

   $ rvm use 1.8.7

then you can try to list the jobflows . . .

like image 144
sasikkumar Avatar answered Mar 25 '23 17:03

sasikkumar


If rvm doesn't work for you, you can try changing the Current symbolic link:

cd /System/Library/Frameworks/Ruby.framework/Versions
sudo rm Current
sudo ln -s 1.8 Current

You may have to adjust the 3rd parameter to point to the correct version.

like image 28
Matt Faus Avatar answered Mar 25 '23 17:03

Matt Faus