2013-10-08 140 views
0

您好,我有一个hadoop集群,我想在R中编写我自己的Mapper和Reducer,然后使用Hadoop Streaming做一些时间序列分析。Hadoop安装R

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

可能存在某种魔力,如:

sudo hadoop install R? # Pseudo code 

谢谢!

回答

1

其实我与Linux的最终期望自动执行此安装。

#!/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 [email protected]$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 
0

使用自动化工具(如PuppetChef)在整个群集中自动执行安装过程。

此外,周边还有像Revolution AnalyticsRhipe的一个R一些包装,使其更易于编写MR方案R.