gpt4 book ai didi

dask - dask 工作人员存储结果或文件的默认目录是什么?

转载 作者:行者123 更新时间:2023-12-05 01:20:29 39 4
gpt4 key购买 nike

[mapr@impetus-i0057 latest_code_deepak]$ dask-worker 172.26.32.37:8786
distributed.nanny - INFO - Start Nanny at: 'tcp://172.26.32.36:50930'
distributed.diskutils - WARNING - Found stale lock file and directory '/home/mapr/latest_code_deepak/dask-worker-space/worker-PwEseH', purging
distributed.worker - INFO - Start worker at: tcp://172.26.32.36:41694
distributed.worker - INFO - Listening to: tcp://172.26.32.36:41694
distributed.worker - INFO - bokeh at: 172.26.32.36:8789
distributed.worker - INFO - nanny at: 172.26.32.36:50930
distributed.worker - INFO - Waiting to connect to: tcp://172.26.32.37:8786
distributed.worker - INFO - -------------------------------------------------
distributed.worker - INFO - Threads: 8
distributed.worker - INFO - Memory: 33.52 GB
distributed.worker - INFO - Local Directory: /home/mapr/latest_code_deepak/dask-worker-spa ce/worker-AkBPtM
distributed.worker - INFO - -------------------------------------------------
distributed.worker - INFO - Registered to: tcp://172.26.32.37:8786
distributed.worker - INFO - -------------------------------------------------

dask-worker 维护临时文件(例如任务结果)或从客户端使用 upload_file() 方法上传的下载文件的默认目录是什么?

例如:-
def my_task_running_on_dask_worker():
//fetch the file from hdfs
// process the file
//store the file back into hdfs

最佳答案

默认情况下,dask 工作人员将目录放置在 ./dask-worker-space/worker-####### 中。哪里######是该特定 worker 的一些随机字符串。

您可以使用 --local-directory 更改此位置。 dask-worker 的关键字可执行。

您在此行中看到的警告

distributed.diskutils - WARNING - Found stale lock file and directory '/home/mapr/latest_code_deepak/dask-worker-space/worker-PwEseH', purging

说 Dask 工作人员注意到另一个工作人员的目录没有清理,大概是因为它以某种方式失败了。这个 worker 正在清理前一个 worker 留下的空间。

编辑

您可以通过查看每个 worker 的日志来查看哪个 worker 创建了哪个目录(他们打印出他们的本地目录)
$ dask-worker localhost:8786
distributed.worker - INFO - Start worker at: tcp://127.0.0.1:36607
...
distributed.worker - INFO - Local Directory: /home/mrocklin/dask-worker-space/worker-ks3mljzt

或以编程方式调用 client.scheduler_info()
>>> client.scheduler_info()
{'address': 'tcp://127.0.0.1:34027',
'id': 'Scheduler-bd88dfdf-e3f7-4b39-8814-beae779248f1',
'services': {'bokeh': 8787},
'type': 'Scheduler',
'workers': {'tcp://127.0.0.1:33143': {'cpu': 7.7,
...
'local_directory': '/home/mrocklin/dask-worker-space/worker-8kvk_l81',
},
...

关于dask - dask 工作人员存储结果或文件的默认目录是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48657374/

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