spark-shell 拒绝来自 mesos master 的报价

spark-shell declining offers from mesos master

我一直在尝试学习 spark on mesos,但是 spark-shell 一直无视优惠。这是我的设置:

所有组件都在同一个子网中

一旦 spark-shell 启动,我 运行 最简单的程序可能

val f = sc.textFile ("/tmp/ok.txt");
f.count()

.. 我不断在 spark-shell

上收到以下日志
 (0 + 0) / 2]17/05/21 15:13:34 WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
17/05/21 15:13:49 WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
17/05/21 15:14:04 WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources

主端日志:(我什至在 spark-shell 中做任何事情之前就看到了这些日志,即使我在 spark 运行 上面的代码 shell )

I0521 15:14:12.949108 10166 master.cpp:6992] Sending 2 offers to framework 64c1ef67-9e4f-4236-bb86-80d7aaab540f-0000 (Spark shell) at scheduler-7a375e65-7a0d-4267-befa-e69937404d5f@172.31.1.203:45596
I0521 15:14:12.955731 10164 master.cpp:4731] Processing DECLINE call for offers: [ 64c1ef67-9e4f-4236-bb86-80d7aaab540f-O34 ] for framework 64c1ef67-9e4f-4236-bb86-80d7aaab540f-0000 (Spark shell) at scheduler-7a375e65-7a0d-4267-befa-e69937404d5f@172.31.1.203:45596
I0521 15:14:12.956130 10167 master.cpp:4731] Processing DECLINE call for offers: [ 64c1ef67-9e4f-4236-bb86-80d7aaab540f-O35 ] for framework 64c1ef67-9e4f-4236-bb86-80d7aaab540f-0000 (Spark shell) at scheduler-7a375e65-7a0d-4267-befa-e69937404d5f@172.31.1.203:45596

我在 Ubuntu 16.04 上使用 Mesos 1.2.0 和 spark 2.1.1。我已经通过编写一个基于 node.js 的小型 http 客户端进行了验证,主站提供的服务似乎不错。这里可能出了什么问题?

好的,这里有两个问题。

  1. SPARK_EXECUTOR_URI原为local,所以改为httplocal 我想是为了 hadoop(在这里纠正我,以防万一)。

  2. 将 URI 更改为 local 后,作为由 mesos-executor 启动的 spark 执行器的一部分运行的 netty blockmanager 服务(作为任务,粗略模式)由由 mesos-agent 启动的 Mesos Containerizer,过去常常尝试绑定到 public IP 失败,因为我已将主机名作为 public IP 传递给 mesos-agent,这必然会失败EC2。事实上,我一开始是通过私有 IP 但不记得为什么我将主机名更改为 public IP。我猜可能是为了检查沙箱日志。 Mesos master 将它重定向到 mesos-agent 的私有 IP,阻止我看到 stderr 日志。 (我位于 EC2 VPC 之外)。请注意,上面的问题将私有 IP 传递给代理,这是正确的。原来,上面的问题是针对第一个问题发的。