2017-02-23 62 views
1

我已经建立了一个分布式集群,这是一个大量使用。在同一台机器上,我想为测试目的设置另一个分布式群集,最好是在IPython笔记本中调用distributed.Client()。但是,我无法弄清楚如何访问第二个群集的散景服务器。如何手动启动dask散景服务器分布式?

调用scheduler_info()表示散景服务器可能没有运行。如何在同一台机器上使用两个具有散景服务器的群集?或者我应该采取完全不同的方法?

回答

2

使用不带参数的Client()是一种在您的个人计算机上为本地“群集”设置简短交互式会话的便捷方式。如果您想以更彻底的方式设置dask调度程序,则可能要尝试使用dask.distributed.LocalClusterdask-scheduler命令行实用程序。见How to set up a dask.distributed network

你可以看到可用选项的文档通过传递--help

(py35) [email protected]:~$ dask-scheduler --help 
Usage: dask-scheduler [OPTIONS] 

Options: 
    --port INTEGER     Serving port 
    --http-port INTEGER   HTTP port 
    --bokeh-port INTEGER   Bokeh port 
    --bokeh-internal-port INTEGER Internal Bokeh port 
    --bokeh/--no-bokeh   Launch Bokeh Web UI [default: True] 
    --host TEXT     IP, hostname or URI of this server 
    --show/--no-show    Show web UI 
    --bokeh-whitelist TEXT   IP addresses to whitelist for bokeh. 
    --prefix TEXT     Prefix for the bokeh app 
    --use-xheaders BOOLEAN   User xheaders in bokeh app for ssl 
           termination in header [default: False] 
    --pid-file TEXT    File to write the process PID 
    --scheduler-file TEXT   File to write connection information. This 
           may be a good way to share connection 
           information if your cluster is on a shared 
           network file system. 
    --help       Show this message and exit. 

为了确保有不在同一机器上的两个调度器之间的任何冲突你要设​​置适当的端口。

dask-scheduler --port XXXX --bokeh-port XXXX --bokeh-internal-port XXXX