0

嗨,我有一个 hadoop 集群,我正在考虑在 R 中编写自己的 Mapper 和 Reducer,然后使用 Hadoop Streaming 进行一些时间序列分析。

但是,我想知道在集群中安装任何类型的软件的“常用”方法是什么。

可能存在一些魔法,例如:

sudo hadoop install R? # Pseudo code

谢谢!

4

2 回答 2

1

实际上,我最终使用 Linux Expect 来自动执行此安装。

#!/usr/bin/expect -f

if {[llength $argv] != 1} {
puts "usage: ssh.exp server"
exit 1
}

set server [lrange $argv 0 0]
set timeout 60

spawn ssh -i key.pem ec2-user@$server

expect "*connecting (yes/no)*"
send -- "yes\r"

expect "*~]$*"

send -- "sudo su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'\r"

send -- "nohup sudo su -c 'yum install -y R R-core R-core-devel R-devel' &\r"

expect "*~]$*"
send -- "exit\r"

interact
于 2013-10-09T20:18:03.237 回答
0

使用PuppetChef等自动化工具跨集群自动化安装过程。

此外,还有一些围绕 R 的包装器,例如来自Revolution AnalyticsRhipe的包装器,可以更轻松地在 R 中编写 MR 程序。

于 2013-10-09T07:54:58.107 回答