fires an event if your hadoop-yarn cluster becomes empty
Project description
Sends event if the yarn-cluster is empty/free to trigger other stuff (e.g. send you an email or start another application)
The HadoopYarnClusterChecker-Class checks your cluster if there is any application run on it. In case your cluster is free it fires an event.
how it works:
- it's false positive: if there is any error like it can not connect to your yarn-rest-api it sends the event.
- algorithm:
- receive data from: "/ws/v1/cluster/apps"-REST endpoint
- are there applications with the state "running"?
- Yes: Is this application excluded?
- Yes: Are there more running applications?
- No: send the event
- Yes: sleep for the intervall & start with the first bulletin-point
Excludes
- has to be a String
- excludes for state-attribute are forbidden!
- don't forget to escape the "
- JSON-Notation:
- Array
- Key-Value-Object
- Key: XML-Tag from the Yarn-Api
- example:
"[ {\"name\":\"Zeppelin\"}, {\"name\":\"Zeppelin1\"} ]"
- meaning: all Applications with the Name "Zeppelin" and "Zeppelin1" will be excluded in case they're running
- filtering:
- for state-attribute is forbidden!
- for multiple attributes like an AND should work:
[ { "name":"Zeppelin", "priority":0 } ]
How to use it:
import hadoop-yarn-cluster-checker-lib
checker = HadoopYarnClusterChecker(server=args.server, path=args.path, intervall=args.intervall, log=args.log,
excludes=args.excludes)
checker.on_empty_cluster += event_empty
Donations
Cheatsheet for me
lore ipsem
Twine
only works with: twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file HadoopYarnClusterCheckerLib-48.tar.gz
.
File metadata
- Download URL: HadoopYarnClusterCheckerLib-48.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd57bd4c4318c39eaac55bf267ecc544ae11c83310a0b036f39319cf341974f9 |
|
MD5 | bd75605fd2b2e2015980a98cd812fdce |
|
BLAKE2b-256 | 70e29fb57c92dc4802934c56a91b5f9184e6ce7d2bdd62f5545dd27eff981c07 |