From d87999aabb4ee1571464b6946fc761dd3f2d70a9 Mon Sep 17 00:00:00 2001 From: Dmitry Romanenko Date: Mon, 15 Nov 2021 23:05:37 -0500 Subject: [PATCH] Cleanup for release 1.0.3 (#110) * Preparation for release 1.0.3 * Drop unsupported classifier * Clean docs, add warning for CLI * Typo diff --- README.md | 31 ++++++++++++++++++++++++++++--- setup.py | 2 +- tox.ini | 3 ++- yarn_api_client/__init__.py | 2 +- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b33b1bc..c0acaee 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,15 @@ Package documentation: REST API documentation: [hadoop.apache.org](http://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/WebServicesIntro.html) +**Warning**: CLI is outdated & broken. Please don't use CLI. This will be resolved in future releases. + --- -## Compatibility -Library is compatible with Apache Hadoop __**3.2.1**__. +## Compatibility Matrix + +| yarn-api-client-python | Hadoop | +| ------------- | ------------- | +| 1.0.2 | 3.2.1 | +| 1.0.3 | 3.3.0, 3.3.1 | If u have version other than mentioned (or vendored variant like Hortonworks), certain APIs might be not working or have differences in implementation. If u plan to use certain API long-term, you might want to make sure its not in Alpha stage in documentation. @@ -37,6 +43,16 @@ From source code pip install git+https://github.com/CODAIT/hadoop-yarn-api-python-client.git ``` +## Enabling support for SimpleAuth + +See example below: +``` +from yarn_api_client.auth import SimpleAuth +from yarn_api_client.history_server import HistoryServer +auth = SimpleAuth('impersonated_account_name') +history_server = HistoryServer('https://127.0.0.2:5678', auth=auth) +``` + ## Enabling support for Kerberos/SPNEGO Security 1. First option - using `requests_kerberos` package @@ -53,7 +69,7 @@ from requests_kerberos import HTTPKerberosAuth history_server = HistoryServer('https://127.0.0.2:5678', auth=HTTPKerberosAuth()) ``` -PS: You __**need**__ to get valid kerberos ticket in systemwide kerberos cache before running your code, otherwise calls to kerberized environment won't go through (run kinit before proceeding to run code) +PS: You **need** to get valid kerberos ticket in systemwide kerberos cache before running your code, otherwise calls to kerberized environment won't go through (run kinit before proceeding to run code) 2. Second option - using `gssapi` package @@ -63,6 +79,8 @@ If you want to avoid using terminal calls, you have to perform SPNEGO handshake ### CLI interface +**Warning**: CLI is outdated & broken. Please don't use CLI. This will be resolved in future releases. + 1. First way ``` bin/yarn_client --help @@ -83,6 +101,13 @@ app_information = am.application_information('application_id') ### Changelog +1.0.3 Release + - Drop support of Python 2.7 (if you still need it for extreme emergency, look into reverting ab4f71582f8c69e908db93905485ba4d00562dfd) + - Update of supported hadoop version to 3.3.1 + - Add support for YARN_CONF_DIR and HADOOP_CONF_DIR + - Add class for native SimpleAuth (#106) + - Add constructor argument for proxies (#109) + 1.0.2 Release - Add support for Python 3.8.x - Fix HTTPS url parsing diff --git a/setup.py b/setup.py index 67a70a4..7cfa295 100644 --- a/setup.py +++ b/setup.py @@ -50,11 +50,11 @@ def find_version(*file_paths): 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Topic :: System :: Distributed Computing', ], ) diff --git a/tox.ini b/tox.ini index b918d1b..8ac4092 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] -envlist = py36, py37, py38, py39 +envlist = py36, py37, py38, py39, py310 [gh-actions] python = @@ -8,6 +8,7 @@ python = 3.7: py37 3.8: py38 3.9: py39 + 3.10: py310 [testenv] deps = diff --git a/yarn_api_client/__init__.py b/yarn_api_client/__init__.py index 7bd665f..fec077b 100644 --- a/yarn_api_client/__init__.py +++ b/yarn_api_client/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -__version__ = '2.0.0.dev0' +__version__ = '1.0.3' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster