- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
请告诉我如何解决以下问题。
首先,我确认以下代码在 master 为“本地”时运行。
然后我启动了两个 EC2 实例 (m1.large)。但是,当 master 为“spark://MASTER_PUBLIC_DNS:7077”时,会出现错误消息“TaskSchedulerImpl”并且失败。
当我从 VALID 地址更改为 Master (spark://INVALID_DNS:7077) 的 INVALID 地址时,会出现相同的错误消息。
即,"WARN TaskSchedulerImpl: Initial job has not accepted any resources; 检查您的集群 UI 以确保工作人员已注册并有足够的内存"
好像this .作为这个评论,我为这个集群分配了 12G 内存,但它失败了。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyspark import SparkContext, SparkConf
from pyspark.mllib.classification import LogisticRegressionWithSGD
from pyspark.mllib.regression import LabeledPoint
from numpy import array
# Load and parse the data
def parsePoint(line):
values = [float(x) for x in line.split(' ')]
return LabeledPoint(values[0], values[1:])
appName = "testsparkapp"
master = "spark://MASTER_PUBLIC_DNS:7077"
#master = "local"
conf = SparkConf().setAppName(appName).setMaster(master)
sc = SparkContext(conf=conf)
data = sc.textFile("/root/spark/mllib/data/sample_svm_data.txt")
parsedData = data.map(parsePoint)
# Build the model
model = LogisticRegressionWithSGD.train(parsedData)
# Evaluating the model on training data
labelsAndPreds = parsedData.map(lambda p: (p.label, model.predict(p.features)))
trainErr = labelsAndPreds.filter(lambda (v, p): v != p).count() / float(parsedData.count())
print("Training Error = " + str(trainErr))
我完成了 friend 建议我完成的三项任务。
1.我打开了主端口,7077。
2.在 master url 中,设置主机名而不是 ip 地址。
->因此,我可以连接到主服务器(我通过 Cluster UI 进行了检查)。
3.我尝试如下设置worker_max_heap,但可能失败了。
ScalaConf().set("spark.executor.memory", "4g").set("worker_max_heapsize","2g")
工作人员允许我使用6.3GB(我通过UI检查过)。它是m1.large。
->我在我的执行日志中发现了一个警告,在一个 worker stderr 中发现了一个错误。
14/08/08 06:11:59 WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient memory
14/08/08 06:14:04 INFO worker.WorkerWatcher: Successfully connected to akka.tcp://sparkWorker@PRIVATE_HOST_NAME1:52011/user/Worker
14/08/08 06:15:07 ERROR executor.CoarseGrainedExecutorBackend: Driver Disassociated [akka.tcp://sparkExecutor@PRIVATE_HOST_NAME1:52201] -> [akka.tcp://spark@PRIVATE_HOST_NAME2:38286] disassociated! Shutting down.
最佳答案
spark-ec2 脚本将 EC2 中的 Spark 集群配置为独立的,这意味着它不能与远程提交一起使用。在弄清楚它不受支持之前,我一直在为您描述的相同错误苦苦挣扎几天。不幸的是,消息错误不正确。
所以你必须复制你的东西并登录到 master 来执行你的 spark 任务。
关于python - 使用 Spark,如何连接 master 或解决错误 :"WARN TaskSchedulerImpl: Initial job has not accepted any resources",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25176197/
warnings.warn() 和有什么区别?和 logging.warn()就它们的作用和应该如何使用而言? 最佳答案 我同意另一个答案——logging 用于记录,warning 用于警告——但我
这是我写的代码: #usr/bin/python3 import warnings def tt(): warnings.warn("123") return 10 x = tt()
我正在尝试使用基于文档中显示的示例的代码片段来提出DeprecationWarning。 http://docs.python.org/2/library/warnings.html#warnings
我正在尝试提出一个 DeprecationWarning,其中包含基于文档中显示的示例的代码片段。 http://docs.python.org/2/library/warnings.html#war
我有兴趣尝试在调用时操纵警告,而无需围绕方法创建支持基础设施。也就是说,我需要能够捕获警告,而无需使用以下代码包装代码: tryCatch(..., warning = function() { ac
我是 js 我正在尝试使用 this.setState({但我收到警告。 你们能告诉我为什么我收到以下警告吗 warning.js:45 警告:setState(...):只能更新已安装或正在安装的组
我的最小例子是 #!/usr/bin/python3 import warnings warnings.warn('Run Forest run!', stacklevel=2) warnings.w
本文整理了Java中com.ibm.wala.util.warnings.Warnings.asString()方法的一些代码示例,展示了Warnings.asString()的具体用法。这些代码示例
本文整理了Java中com.ibm.wala.util.warnings.Warnings.clear()方法的一些代码示例,展示了Warnings.clear()的具体用法。这些代码示例主要来源于G
本文整理了Java中com.ibm.wala.util.warnings.Warnings.add()方法的一些代码示例,展示了Warnings.add()的具体用法。这些代码示例主要来源于Githu
我一定是错误地理解了警告文档。我读它的方式,这段代码: use warnings; use warnings FATAL => 'all'; warnings::warn('numeric', 'bl
我在 Linux 上使用 OpenMP 指令编译 C 代码时收到此警告: warning: ignoring #pragma omp parallel Gcc 版本是 4.4。 这只是一个我不应该关心
我有一个奇怪的 g++ 行为,当显示任何其他警告时,它会显示有关无法识别的命令行选项的警告。 例子: struct Foo{virtual int bar() = 0;}; struct Bar:pu
在 Visual Studio 2010 中使用 C++ native 解决方案。 #pragma warning (push) 用于 cpp 文件的开头,在所有包含之后。之后,#pragma war
我习惯于开始我的每一个脚本 use strict; use warnings; 但是这里的一些知名人士推荐 use warnings 'all'; 如果我理解正确,后者甚至比第一个更好。所以我通读了d
我正在编码C#。我使用NCrunch在后台运行单元测试。我已经在CSPROJ文件中设置了(新的CSPROJ格式)。 我想将FxCop分析仪用作NuGet软件包:https://docs.microso
谁能帮我解决这个问题,我收到此警告消息 log4j:WARN No appenders could be found for logger (com.akak.book.shop.listener.L
我正在尝试了解更多关于 linux 内核中的 kobject 的信息,并且在尝试编写一个使用此类工具的模块时,我收到了错误和警告消息,因此我将相关数据的精简版本放在这里结构和相应的gcc的错误和警告信
http://docs.python.org/2/howto/logging.html 上的样本同时使用 warn 和 warning。 最佳答案 logging.warn 自 Python 3.3
警告[nuxt]两个解析为相同名称ProseCode的组件文件:。警告[nuxt]两个解析为相同名称ProsePre的组件文件:。更新nuxt 3后的警告->3.7&nuxt/内容2.4->2.8。如
我是一名优秀的程序员,十分优秀!