knit
The knit library provides a Python interface to Scala for interacting with the YARN resource manager.
View the documentation for knit.
Overview
knit allows you to use python in conjunction with YARN, the most common resource manager for Hadoop systems. It provides to following high-level entry-points:
CondaCreator, a way to create zipped conda environments, so that they can be uploaded to HDFS and extracted for use in YARN containers
YARNAPI, an interface to the YARN resource manager to get application/container statuses, logs, and to kill running jobs
Knit, a YARN application runner, which generates an instance of a scala-based YARN client, and launches an application on YARN, which in turn runs commands in YARN containers
DaskYARNCluster, launches a Dask distributed cluster on YARN, one worker process per container.
The intent is to use knit from a cluster edge-node, i.e., with YARN configuration and the CLI available locally.
Quickstart
Install from conda-forge
> conda install -c conda-forge knit
or with pip
> pip install knit
If installing from source, you must first build the java library (requires java and maven)
> python setup.py install mvn
To run an arbitrary command on the yarn cluster
import knit
k = knit.Knit()
k.start('env') # wait some time
k.logs()
To start a dask cluster on YARN
import dask_yarn
cluster = dask_yarn.DaskYARNCluster()
cluster.start(nworkers=4, memory=1024, cpus=2)
Metadata
Release files for knit 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| knit-0.2.4.tar.gz | 23.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| knit-0.2.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 46.4 MB
Release files / knit-0.2.4.tar.gz
| Download URL | knit-0.2.4.tar.gz |
|---|---|
| Size | 23.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f94193d93bc785c2603c110cde98a2bb5c89b9124d6d9e9bf0cd9be680b9bbc2
|
|
BLAKE2b-256 checksum How to use checksums |
a0d7304fbb4d32bc317a7b05e43685d7542df8cf3fa719e6db16f0b30b0144d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / knit-0.2.4-py2.py3-none-any.whl
| Download URL | knit-0.2.4-py2.py3-none-any.whl |
|---|---|
| Size | 23.2 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7555ca1750844be48ef3352a68189911a17c33aa8000f0d9355fa6fa22e27db6
|
|
BLAKE2b-256 checksum How to use checksums |
1aab88c2cfebd4e11f8df3801ad03832062cc6f6f5ed6606b5d2962b5eacbe9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |