Dask-Yarn deploys Dask on YARN
clusters, such as are found in traditional Hadoop installations. Dask-Yarn
provides an easy interface to quickly start, scale, and stop Dask clusters
natively from Python.

fromdask_yarnimportYarnClusterfromdask.distributedimportClient# Create a cluster where each worker has two cores and eight GiB of memorycluster=YarnCluster(environment='environment.tar.gz',worker_vcores=2,worker_memory="8GiB")# Scale out to ten such workerscluster.scale(10)# Connect to the clusterclient=Client(cluster)