gpt4 book ai didi

apache-spark - 即使在应用程序中设置内核时,Spark UI 也显示 0 个内核

转载 作者:行者123 更新时间:2023-12-01 03:35:40 24 4
gpt4 key购买 nike

我在从 spark master url 运行应用程序时遇到了一个奇怪的问题,其中 UI 无限期地报告“WAITING”的“STATE”,因为 0 个内核显示在 RUNNING APPLICATIONs 表下,无论我将内核数配置为什么是。

我已经使用以下设置配置了我的应用程序,其中 spark.max.cores = 2 & spark.default.cores = 2 & 内存设置为 3GB。该机器是具有超过 24 个内核的企业级服务器。

        SparkConf conf = new SparkConf()
.setAppName(Properties.getString("SparkAppName"))
.setMaster(Properties.getString("SparkMasterUrl"))
.set("spark.executor.memory", Properties.getString("SparkExecMem"))
.set("spark.cores.max",Properties.getString("SparkCores"))
.set("spark.driver.memory",Properties.getString("SparkDriverMem"))
.set("spark.eventLog.enabled", "true")
.set("spark.deploy.defaultCores",Properties.getString("SparkDefaultCores"));

//Set Spark context
JavaSparkContext sc = new JavaSparkContext(conf);
JavaStreamingContext jssc = new JavaStreamingContext(sc, new Duration(5000));

enter image description here

Spark WebUI 声明使用了零个内核并无限期地等待没有任务运行。该应用程序还在运行时或内核期间使用 NO MEMORY,并在启动时立即进入等待状态。
Spark-defaults.conf 
spark.yarn.max_executor.failures 3
spark.yarn.applicationMaster.waitTries 10
spark.history.kerberos.keytab none
spark.yarn.preserve.staging.files False
spark.yarn.submit.file.replication 3
spark.history.kerberos.principal none
spark.yarn.historyServer.address {removed}.{removed}.com:18080
spark.yarn.scheduler.heartbeat.interval-ms 5000
spark.yarn.queue default
spark.yarn.containerLauncherMaxThreads 25
spark.yarn.driver.memoryOverhead 384
spark.history.ui.port 18080
spark.yarn.services org.apache.spark.deploy.yarn.history.YarnHistoryService
spark.yarn.max.executor.failures 3
spark.driver.extraJavaOptions -Dhdp.version=2.2.6.0-2800
spark.history.provider org.apache.spark.deploy.yarn.history.YarnHistoryProvider
spark.yarn.am.extraJavaOptions -Dhdp.version=2.2.6.0-2800
spark.yarn.executor.memoryOverhead 384

提交脚本
spark-submit --class {removed}.{removed}.{removed}.sentiment.MainApp --deploy-mode client /path/to/jar
编辑:2/3/2016
使用 --master yarn-cluster 运行后,我在 yarn 日志错误中收到了这个。我还包括了我更新的提交配置

提交配置
spark-submit --class com.removed.removed.sentiment.MainApp 
--master yarn-cluster --supervise
/data04/dev/removed/spark/twitternpi/npi.sentiment-1.0-SNAPSHOT-shaded.jar
--jars /usr/hdp/2.2.6.0-2800/spark/lib/datanucleus-core-3.2.10.jar,/usr/hdp/2.2.6.0-2800/spark/lib/datanucleus-api-jdo-3.2.6.jar,/usr/hdp/2.2.6.0-2800/spark/lib/datanucleus-rdbms-3.2.9.jar,/usr/hdp/2.2.6.0-2800/spark/lib/spark-1.2.1.2.2.6.0-2800-yarn-shuffle.jar,/usr/hdp/2.2.6.0-2800/spark/lib/spark-assembly-1.2.1.2.2.6.0-2800-hadoop2.6.0.2.2.6.0-2800.jar

错误信息
   ClassLoaderResolver for class "" gave error on creation : {1}
org.datanucleus.exceptions.NucleusUserException: ClassLoaderResolver for class "" gave error on creation : {1}
at org.datanucleus.NucleusContext.getClassLoaderResolver(NucleusContext.java:1087)
at org.datanucleus.PersistenceConfiguration.validatePropertyValue(PersistenceConfiguration.java:797)
at org.datanucleus.PersistenceConfiguration.setProperty(PersistenceConfiguration.java:714)
at org.datanucleus.PersistenceConfiguration.setPersistenceProperties(PersistenceConfiguration.java:693)
at org.datanucleus.NucleusContext.<init>(NucleusContext.java:273)
at org.datanucleus.NucleusContext.<init>(NucleusContext.java:247)
at org.datanucleus.NucleusContext.<init>(NucleusContext.java:225)

最佳答案

当执行程序所需的内存大小由 spark.executor.memory 设置时,我遇到了这个问题。在 spark-defaults.conf , 比 AWS 节点上的要大。但是由于您只将 3.0 GB 设置为您的内存,我认为您的情况可能还有其他原因。

关于apache-spark - 即使在应用程序中设置内核时,Spark UI 也显示 0 个内核,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35169015/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com