Skip to main content

Python wrapper for YARN Applications

Project description

Build Status Coverage Status

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

from knit import dask_yarn
cluster = dask_yarn.DaskYARNCluster()
cluster.start(nworkers=4, memory=1024, cpus=2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

knit-0.2.3.tar.gz (23.2 MB view details)

Uploaded Source

Built Distribution

knit-0.2.3-py3-none-any.whl (23.2 MB view details)

Uploaded Python 3

File details

Details for the file knit-0.2.3.tar.gz.

File metadata

  • Download URL: knit-0.2.3.tar.gz
  • Upload date:
  • Size: 23.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for knit-0.2.3.tar.gz
Algorithm Hash digest
SHA256 0086828db168e984f8fc0d8e44de8f656dcbfc859b804b07042b8e78fb66d408
MD5 c377e933f9638a9088770175f3220943
BLAKE2b-256 47e4143ffe3490cb9a6ac71a9ef120167063eba6254bdc5c17df70426ed31ad0

See more details on using hashes here.

File details

Details for the file knit-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for knit-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 90fd644422a9af2ad1eb0a94c6056459cb2996334b5b475ef23226df6cc03172
MD5 5a77b13121e52ee36c0bc4f2eed061a3
BLAKE2b-256 63e3b4d6954816d3fa8c286ea6bcaa90027cb6db995c6d93747a4dadcbd9afe2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page