我试图segue
从https://jeffreybreen.wordpress.com/2011/01/10/segue-r-to-amazon-elastic-mapreduce-hadoop/重现使用的简单示例
集群创建成功
> cl <- createCluster(numInstances=2)
STARTING - 2012-05-27 14:02:08
STARTING - 2012-05-27 14:02:39
STARTING - 2012-05-27 14:03:10
STARTING - 2012-05-27 14:03:42
STARTING - 2012-05-27 14:04:13
STARTING - 2012-05-27 14:04:44
STARTING - 2012-05-27 14:05:15
STARTING - 2012-05-27 14:05:46
STARTING - 2012-05-27 14:06:17
BOOTSTRAPPING - 2012-05-27 14:06:48
BOOTSTRAPPING - 2012-05-27 14:07:19
BOOTSTRAPPING - 2012-05-27 14:07:50
BOOTSTRAPPING - 2012-05-27 14:08:21
BOOTSTRAPPING - 2012-05-27 14:08:52
BOOTSTRAPPING - 2012-05-27 14:09:23
BOOTSTRAPPING - 2012-05-27 14:09:55
WAITING - 2012-05-27 14:10:26
Your Amazon EMR Hadoop Cluster is ready for action.
Remember to terminate your cluster with stopCluster().
Amazon is billing you!
本地模拟没问题,但是在集群上运行每次都报错。
> myList <- NULL
> set.seed(1)
> for (i in 1:10){
+ a <- c(rnorm(999), NA)
+ myList[[i]] <- a
+ }
> outputLocal <- lapply(myList, mean, na.rm=T)
> outputEmr <- emrlapply(cl, myList, mean, na.rm=T)
RUNNING - 2012-05-27 14:11:58
RUNNING - 2012-05-27 14:12:29
RUNNING - 2012-05-27 14:13:00
WAITING - 2012-05-27 14:13:31
Error in lines[[i]] : subgroup is out of range
> stopCluster(cl)
我喜欢这个包的想法,我希望它对我的工作有用,但我不知道如何解决这个基本问题。
segue
0.02版本
操作系统:Ubuntu 11.10
更新:我尝试运行另一个 Pi 估计示例测试用例,并emrlapply
返回相同的错误消息。
UPDATE2:我更新到 0.03 版,现在我无法连接到集群。成功启动实例后尝试关闭但没有任何效果。我通过 AWS 控制台终止了实例。所以老问题解决了,但新问题出现了。
> cl <- createCluster(numInstances=2)
STARTING - 2012-06-01 22:36:10
STARTING - 2012-06-01 22:36:41
STARTING - 2012-06-01 22:37:12
STARTING - 2012-06-01 22:37:43
STARTING - 2012-06-01 22:38:14
STARTING - 2012-06-01 22:38:46
SHUTTING_DOWN - 2012-06-01 22:39:17
SHUTTING_DOWN - 2012-06-01 22:39:48
...
SHUTTING_DOWN - 2012-06-01 22:48:05
SHUTTING_DOWN - 2012-06-01 22:48:36
FAILED - 2012-06-01 22:49:07
>