我正在实现Apache Spark RDD但我一直收到此错误:
Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
我知道我有大量的数据(10gb),但我应该能够为我的应用程序分配足够的资源来运行 .
有没有办法知道我的RDD的大小,然后分配必要的资源?独立应用程序的建议配置是什么?由于我只使用我的电脑(16GB RAM,磁盘上100GB)我应该使用8个核心还是4个核心?
亲切的问候
PYSPARK_PYTHON=python3 spark-submit --master spark://luiscosta:7077 --driver-cores 4 --driver-memory 70g --num-executors 2 --executor-memory 50g --executor-cores 4 --conf spark.driver.maxResultSize="0" spark_preprocessing.py
EDIT
我设法解决了 initial job
错误 . 然而,在运行45分钟后,我的堆空间用尽了 .
有没有办法找到 balancer ,所以我有足够的资源和堆空间?我基本上减少了驱动程序内存并增加了执行程序的数量 . 我真的不明白这是如何解决我的资源问题,也不是为什么我的应用程序耗尽了堆空间 .
PYSPARK_PYTHON=python3 spark-submit --master spark://luiscosta:7077 --driver-cores 4 --driver-memory 8g --num-executors 3 --executor-memory 14G --executor-cores 4 --conf spark.driver.maxResultSize="0" spark_preprocessing.py
1 回答
我修好了它 .
据我所知,
Initial job has not accepted any resources
错误与spark.executor-memory
和Java Heap Space
与spark.driver.memory
相关联 . 我调整了这些参数,一切运行正常 .