【问题标题】:Databricks notebook detaches in standard cluster modeDatabricks 笔记本在标准集群模式下分离
【发布时间】:2020-02-07 00:06:49
【问题描述】:

编辑:更新。无论用户数量如何,都会发生这种情况。即使只有一个用户,它仍然会发生。

databricks 笔记本在使用时反复分离。

我们的数据科学家来自 Jupyter 背景,由于 Koalas 存在一些差距,他继续使用 Pandas 并采取了一些变通办法,这意味着驱动程序的负载要重得多,但笔记本似乎可以正常工作。

我已经寻找遇到类似问题的人,但没有看到这个。

这是我的火花配置:

spark.driver.extraJavaOptions -XX:+UseG1GC
spark.driver.cores 8
spark.driver.memory 16g
spark.executor.extraJavaOptions -XX:+UseG1GC

数据科学家在分离时看到的两个错误:

笔记本分离

Notebook detached
Exception when creating execution context: 
java.util.concurrent.TimeoutException: Exchange timed out after 15 seconds.

Spark 上下文已停止

The spark context has been stopped or the cluster has been terminated.
Please restart the cluster or attach this notebook to a different cluster.

集群看起来不错,因为我可以连接另一个笔记本并运行命令。

我期望发生的是,笔记本电脑在任何时候都不会被随机分离并丢失所有工作。

当我查看驱动程序日志时,只有这些消息很突出:

19/10/08 18:02:59 INFO TaskSchedulerImpl: Killing all running tasks in stage 82: Stage finished
19/10/08 18:02:59 INFO DAGScheduler: Job 57 finished: collectResult at OutputAggregator.scala:149, took 9.157699 s
19/10/08 18:02:59 INFO SQLAppStatusListener: Execution ID: 28 Total Executor Run Time: 21250
19/10/08 18:02:59 INFO CodeGenerator: Code generated in 21.921114 ms
19/10/08 18:03:00 INFO ProgressReporter$: Removed result fetcher for 8919779546758574174_8732072469296650198_763335e3d46b4641ba75b3c6d4b4ffac
19/10/08 18:04:30 INFO DriverCorral$: Cleaning the wrapper ReplId-5231d-7b5c0-a6423-e (currently in status Idle(ReplId-5231d-7b5c0-a6423-e))
19/10/08 18:04:30 INFO DriverCorral$: sending shutdown signal for REPL ReplId-5231d-7b5c0-a6423-e
19/10/08 18:04:31 INFO PythonDriverLocal$Watchdog: Python shell exit code: 143
19/10/08 18:04:31 INFO PythonDriverLocal$RedirectThread: Python RedirectThread exit
19/10/08 18:04:31 INFO PythonDriverLocal$RedirectThread: Python RedirectThread exit
19/10/08 18:04:31 INFO PythonDriverLocal$Watchdog: No strace information recovered: /tmp/637654b25044473abae9a282b9564078.strace is missing
19/10/08 18:04:31 INFO DriverCorral$: sending the interrupt signal for REPL ReplId-5231d-7b5c0-a6423-e
19/10/08 18:04:31 INFO DriverCorral$: waiting for localThread to stop for REPL ReplId-5231d-7b5c0-a6423-e
19/10/08 18:04:31 INFO DriverCorral$: ReplId-5231d-7b5c0-a6423-e successfully discarded

【问题讨论】:

    标签: apache-spark databricks azure-databricks


    【解决方案1】:

    我遇到了类似的问题。驱动程序崩溃并停止,并显示此消息。 在我的情况下,工作只是在驱动程序上执行,它没有足够的容量来执行工作(查询 + s3 文件保存)。 我减少了 df maxRecordsPerFile,所以现在有更多文件(在我只有一个之前),并且可以在节点之间并行化它。在此之后,作业执行良好。并且驱动程序不再崩溃并与笔记本电脑分离。 希望对你有帮助。

    【讨论】:

      【解决方案2】:

      我也有类似的问题,但从单个文件或 Kafka 主题中读取行。我们的第一次加载有大约 200 万条记录。即使完成后,如果我们只收到一个新的单行,它也不会继续,因为延迟的流在“处理队列”中(如下图所示的“4 小时前更新”)。

      在这些情况下,我们使用“maxBytesPerTrigger”来降低其值,直到可以正常工作而不会中断或花费很长时间来启动流式查询。之后我们得到了更好的结果。

      如果没有此选项或使用较大的值作为参数,我们会遇到较长的流式更新间隔或丢失连接错误,如下所示:

      【讨论】:

        猜你喜欢
        • 2020-11-13
        • 2019-04-05
        • 2021-12-21
        • 2022-11-07
        • 2022-10-09
        • 2020-11-19
        • 2014-11-22
        • 2023-01-14
        • 1970-01-01
        相关资源
        最近更新 更多