AmazonElasticMapReduce:在命令行工具中列出作业流问题?

byqmnocz  于 2021-06-03  发布在  Hadoop
关注(0)|答案(4)|浏览(372)

我是amazonweb服务的新手,我正在尝试在amazonelasticmap上运行作业流,使用命令行界面工具减少作业。
我遵循了亚马逊开发者指南的步骤和aws开发者指南的步骤,但是我还不太清楚。
如果执行命令./elastic mapreduce--list列出作业流。显示以下错误。

/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>'

提前谢谢,谁能告诉我为什么我在列出工作流程时出现上述错误。

dsf9zpds

dsf9zpds1#

如果 rvm 不适合你,你可以试着改变 Current 符号链接:

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

您可能需要调整第3个参数以指向正确的版本。

bkhjykvo

bkhjykvo2#

我建议先学习如何使用服务控制台执行该过程。
您的命令行工具似乎无法正确连接。可能这是您的访问密钥和密钥的问题。

72qzrwbm

72qzrwbm3#

使用以下命令检查Aviable rvm

$ rvm list

它将显示:

ruby-1.8.7-p374
   ruby-2.0.0-p247

然后您应该使用以下命令指定rvm版本

$ rvm use 1.8.7

然后您可以尝试列出作业流。

j9per5c4

j9per5c44#

作为@sasikkumar答案,但带有rbenv

$ rbenv versions

它将显示:

1.8.7-p370
   * 1.9.3-p194 (set by /PATH_NEEDED/.ruby-version)

(可选)如果1.8.7-p370未出现

$ rbenv install 1.8.7-p370

然后您应该使用以下命令指定rbenv版本

$ rbenv local 1.8.7-p370

( local 因为它将在需要的路径上使用,但您可以使用 global 一般用途)
然后您可以尝试列出作业流。

相关问题