HdfsCLI
Project description
HdfsCLI ![build_image](https://pypi-camo.freetls.fastly.net/772b2d7de374943c45be1ecf2abba368ecb36ccf/68747470733a2f2f7472617669732d63692e6f72672f6d7474682f686466732e706e673f6272616e63683d6d6173746572)
API and command line interface for HDFS.
Features
Works with secure and insecure clusters (including Kerberos authentication).
Comprehensive python bindings for the WebHDFS API.
Lightweight CLI.
CLI
$ hdfs --info --depth=1
0 B 3d D /user/alice
$ echo 'Hello, world!' | hdfs /user/alice/hello.rst --write
$ hdfs --info --depth=1
14 B 1m D /user/alice
14 B 1m F /user/alice/hello.rst
$ hdfs /user/alice/data --read
Hello, world!
Other options include support for merging part-files, progress meters. Cf.
hdfs --help
for more.
API
Sample usage of the python bindings:
from hdfs import KerberosClient
# Instantiate the client
client = KerberosClient('http://namenode:port', root='/user/alice')
# Write a file '/user/alice/hello.md' on HDFS with contents 'Hello, world!'
client.write('hello.md', 'Hello, world!')
# Rename it
client.rename('hello.md', 'hello.rst')
# Download it locally
client.download('hello.rst', 'hello.rst')
# Remove it from HDFS
client.delete('hello.rst')
Documentation
The full documentation can be found here.
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
hdfs-0.2.0.tar.gz
(11.9 kB
view hashes)