我正在 EMR emr-4.3.0 上运行 Spark 应用程序,有 1 个主节点和 4 个节点
每一颗都有 5GB 内存和 2 个核心。
以下是我的火花提交选项
--class com.mobi.vserv.driver.Query5kPids1
--num-executors 4
--执行程序内存 4g
--执行程序核心 2
--驱动程序内存 4g
但我不断收到以下错误
错误 executor.CoarseGrainedExecutorBackend:驱动程序 10.225.19.144:56334 已解除关联!正在关闭。
最后,Yarn 杀死了应用程序主机
错误 ApplicationMaster:收到信号 15:SIGTERM
1)我可以进一步改进 num-executors 和 executor-cores 的 Spark-Submit 选项吗?
2)我在性能图中看到只有2个节点CPU的利用率高于50%,而另外2个节点的CPU利用率低于5%。
3) 有趣的是,我在 2 个节点和 1 个主节点上运行了相同的应用程序,并且使用 Spark-submit 中给出的相同配置,并且应用程序运行成功。那么 4 个节点出现这种行为的原因是什么
我正在初始化一个累加器
final Accumulator<Integer> accum = sc.accumulator(0);
然后在map函数中,我试图递增累加器,然后在设置变量时使用累加器值.
JavaRDD<UserSetGet> UserProfileRDD1 = temp.map(new Function<String, UserSetGet>() {
@Override
public UserSetGet call(String arg0) throws Exception {
UserSetGet usg = new UserSetGet();
accum.add(1);
usg.setPid(accum.value().toString();
}
});
Run Code Online (Sandbox Code Playgroud)
但我得到以下错误.
16/03/14 09:12:58 ERROR executor.Executor:阶段2.0(TID 2)中任务0.0的异常java.lang.UnsupportedOperationException:无法读取任务中的累加器值
编辑 - 根据Avihoo Mamka的回答,无法在任务中获得累加器值.
那么无论如何我可以并行实现同样的目标.这样,每当变量(例如像静态变量)在我的map函数中递增时,Pid值就会被设置.
我试图从cassandra(版本2.1.6)种子节点之一中删除死节点(我只从一个种子节点运行).
/ nodetool removenode NodeID
但它挂了太久了, /nodetool removenode status
RemovalStatus:删除令牌(-9171133960945511267).等待来自[/ xxxx,/ xxxx,/ xxxx,/ xxxx]的复制确认.
使用CTRL-C我停止了命令
但是当我试着跑的时候
./nodetool removenode强制NodeID
它说
error: This node is already processing a removal. Wait for it to complete, or use 'removenode force' if this has failed.
-- StackTrace --
java.lang.UnsupportedOperationException: This node is already processing a removal. Wait for it to complete, or use 'removenode force' if this has failed.
Run Code Online (Sandbox Code Playgroud)
通常的行动方式是什么,这样我的群集无论如何都不会受到影响.