Skip to content

Commit

Permalink
Cleanup for release 1.0.3 (#110)
Browse files Browse the repository at this point in the history
* Preparation for release 1.0.3

* Drop unsupported classifier

* Clean docs, add warning for CLI

* Typo diff
  • Loading branch information
dimon222 authored Nov 16, 2021
1 parent 528be9f commit d87999a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
)
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

[tox]
envlist = py36, py37, py38, py39
envlist = py36, py37, py38, py39, py310

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310

[testenv]
deps =
Expand Down
2 changes: 1 addition & 1 deletion yarn_api_client/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit d87999a

Please sign in to comment.