首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >过滤大量字符串组合中的数据

过滤大量字符串组合中的数据
EN

Stack Overflow用户
提问于 2018-05-30 21:24:01
回答 1查看 85关注 0票数 0

我有一个数据帧(大约50 gb)和3个列表(每个元素有几百个元素,组合总数为445005)。

我需要检查列url中的值是否与3个列表中的任何组合匹配,并返回此组合。我是这样做的。

代码语言:javascript
复制
def checkMatch(query1:List[String], query2:List[String], model:List[String]):List[(String, String, String)]= {
for{
x <- query1
y <- query2
z <- model
if(url.contains(x) && url.contains(y) && url.contains(z))
} yield (x,y,z)
}

在这个fails.As中,应用程序不会停止,但每个任务都会失败,并显示

代码语言:javascript
复制
ExecutorLostFailure (executor 26 exited unrelated to the running tasks) Reason: Container container on host: host was preempted.

应用程序会一直运行,直到我终止它,没有任何任务完成。

我发现的关于这个错误的所有信息都表明内存不足。我的配置是

代码语言:javascript
复制
spark-submit \
--class Main \
--master yarn \
--deploy-mode client \
--num-executors 200 \
--executor-cores 10 \
--driver-memory 4G \
--executor-memory 8G \
--files hive-site.xml#hive-site.xml \
--conf spark.task.maxFailures=10 \
--conf spark.executor.memory=8G \
--conf spark.app.name=spark-job \
--conf spark.yarn.executor.memoryOverhead=4096 \
--conf spark.yarn.driver.memoryOverhead=2048 \
--conf spark.shuffle.service.enabled=true \
--conf spark.shuffle.consolidateFiles=true \
--conf spark.broadcast.compress=true \
--conf spark.shuffle.compress=true \
--conf spark.shuffle.spill.compress=true \
--conf spark.network.timeout=10000000 \
--conf spark.executor.heartbeatInterval=10000000 \

我试着多分配2-3倍的内存。这没什么用。

还有其他的解决方案吗?实际上,内存不足是原因吗?

EN

回答 1

Stack Overflow用户

发布于 2018-05-31 02:11:59

这段代码发生在驱动程序上,因为您没有指定任何特殊的关键字,比如map或reduce,这就是为什么要花这么长时间的原因。这些列表可以被展平成一个列表,因为它们只是字符串?这将使map-reduce变得更容易。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50605873

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档