Skip to main content

Jupyter Server extension to browse HDFS filesystem

Project description

HdfsBrowser

Hadoop JupyterLab Extension

This extension is composed of a Python package named hdfsbrowser, which installs the server+nbextension and a NPM package named @swan-cern/hdfsbrowser for the JupyterLab extension.

Hadoop JupyterLab Extension

Requirements

  • JupyterLab >= 2.1

Install

Note: You will need NodeJS to install the extension.

pip install hdfsbrowser
jupyter nbextension install hdfsbrowser --py
jupyter nbextension enable  hdfsbrowser --py
jupyter lab build

Configure extension to work with Hadoop cluster through hdfs-site.xml

Configure notebook jupyter_notebook_config.py:

c.HDFSBrowserConfig.hdfs_site_path = "/cvmfs/sft.cern.ch/lcg/etc/hadoop-confext/conf/etc/analytix/hadoop.analytix/hdfs-site.xml"
c.HDFSBrowserConfig.hdfs_site_namenodes_property = "dfs.ha.namenodes.analytix"
c.HDFSBrowserConfig.hdfs_site_namenodes_port = "50070"
c.HDFSBrowserConfig.webhdfs_token = "dummy"

Troubleshoot

If you are not seeing the frontend, check if it's installed:

jupyter labextension list

If it is installed, try:

jupyter lab clean
jupyter lab build

Contributing

Install

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment
# Move to hdfsbrowser directory

# Install server extension
# This will also build the js code
pip install -e .

# Install and enable the nbextension
jupyter nbextension install hdfsbrowser --py --sys-prefix
jupyter nbextension enable  hdfsbrowser --py --sys-prefix

# Link your development version of the extension with JupyterLab
jupyter labextension link .
# Rebuild JupyterLab after making any changes
jupyter lab build

# Rebuild Typescript source after making changes
jlpm build
# Rebuild JupyterLab after making any changes
jupyter lab build

You can watch the source directory and run JupyterLab in watch mode to watch for changes in the extension's source and automatically rebuild the extension and application.

# Watch the source directory in another terminal tab
jlpm watch
# Run jupyterlab in watch mode in one terminal tab
jupyter lab --watch

Uninstall

pip uninstall hdfsbrowser
jupyter labextension uninstall @swan-cern/hdfsbrowser

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hdfsbrowser-0.1.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hdfsbrowser-0.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file hdfsbrowser-0.1.0.tar.gz.

File metadata

  • Download URL: hdfsbrowser-0.1.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

File hashes

Hashes for hdfsbrowser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e2d5e4d52c2d91c9c0e0213f23bd121685c75ed1e19617627a3156ffd8263f8a
MD5 35b742c56b1d7e7051b11f9c2f1caa9f
BLAKE2b-256 ca7a41589408e94b1c1a4b88ee4f00d6ca9c8f32ab6451ef56c5fd96d0e822a1

See more details on using hashes here.

File details

Details for the file hdfsbrowser-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hdfsbrowser-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

File hashes

Hashes for hdfsbrowser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a79bb2e689889f6d106db269759768a71b1ac4de0d951ba8ba1688e039ae1bcc
MD5 545e3d70dd0180071ebcf15e9e6ea1ec
BLAKE2b-256 9621a1d4766a299c49d4b5cdf4eef0e60e8a85ed4387b69aba81a2430e19b054

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page