Hadoop FileSystem Java Class Wrapper
Typed Python wrappers for Hadoop FileSystem class family.
Installation
You can install this package from pypi on any Hadoop or Spark runtime:
pip install hadoop-fs-wrapper
Select a version that matches hadoop version you are using:
| Hadoop Version / Spark version | Compatible hadoop-fs-wrapper version |
|---|---|
| 3.2.x / 3.2.x | 0.4.x |
| 3.3.x / 3.3.x | 0.4.x, 0.5.x |
| 3.3.x / 3.4.x | 0.6.x |
| 3.5.x / 3.5.x | 0.7.x |
Usage
Common use case is accessing Hadoop FileSystem from Spark session object:
from hadoop_fs_wrapper.wrappers.file_system import FileSystem
file_system = FileSystem.from_spark_session(spark=spark_session)
Then, for example, one can check if there are any files under specified path:
from hadoop_fs_wrapper.wrappers.file_system import FileSystem
def is_valid_source_path(file_system: FileSystem, path: str) -> bool:
"""
Checks whether a regexp path refers to a valid set of paths
:param file_system: pyHadooopWrapper FileSystem
:param path: path e.g. (s3a|abfss|file|...)://hello@world.com/path/part*.csv
:return: true if path resolves to existing paths, otherwise false
"""
return len(file_system.glob_status(path)) > 0
Contribution
Currently basic filesystem operations (listing, deleting, search, iterative listing etc.) are supported. If an operation you require is not yet wrapped, please open an issue or create a PR.
All changes are tested against Spark 3.4 running in local mode.
Metadata
Release files for hadoop-fs-wrapper 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hadoop_fs_wrapper-0.7.2.tar.gz | 8.9 kB | Without provenance | Details for hadoop_fs_wrapper-0.7.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hadoop_fs_wrapper-0.7.2-py3-none-any.whl | Python 3 | none | any | Details for hadoop_fs_wrapper-0.7.2-py3-none-any.whl |
Total release size: 33.8 kB
Release files / hadoop_fs_wrapper-0.7.2.tar.gz
| Download URL | hadoop_fs_wrapper-0.7.2.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e1267a136fd44d524a0edaf15c1b219f88d8520e5434873277fc350d92aab35
|
|
BLAKE2b-256 checksum How to use checksums |
544b788365f2a4a58fa6cd992699e066c42f05be3bfedf210680ddb2d0852a92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.11.14 Linux/6.11.0-1018-azure
|
Release files / hadoop_fs_wrapper-0.7.2-py3-none-any.whl
| Download URL | hadoop_fs_wrapper-0.7.2-py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41664f351f5d11e8a46873abc9364ed86746cafe4e64d8a62183e47c4a57872f
|
|
BLAKE2b-256 checksum How to use checksums |
7c06f605b05e6f6c558dec30015294c09c26c8f2fc973563d4557ced79e49464
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.11.14 Linux/6.11.0-1018-azure
|
Security for hadoop-fs-wrapper 0.7.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.