Browse HDFS(Hadoop Distributed File System) in Emacs using Tramp.
Put this somewhere in your init file. Eg. ~/.emacs or ~/.emacs.d/init.el
(require 'tramp-hdfs)
It uses hdfs rest api/webhdfs which is supported in hadoop 1 & 2. The syntax to open file in hdfs is just like opening file over tramp.
/hdfs:root@node-1:/tmp
Here, root is the user that you want to use, node-1 is the name of the hadoop server. As a general advice refrain from using superuser accounts like hdfs, hadaoop.
- Directory browsing
- Opening files
- Deleting files/directories
- The server must support webhdfs
- Manually: Download tramp-hdfs.el and add the location to load path.
- Through melpa: Ensure you have melpa in your package-archives (see Melpa Installation). Then, M-x package-install [RET] tramp-hdfs.
docker run -it --rm -v `pwd`:/root/.emacs.d silex/emacs
- Test assume a running HDFS instance at host "node-1". You will need to map this name to your actual instance via /etc/hosts or some other mechanism.
docker run -it --rm -v `pwd`:/root/.emacs.d silex/emacs --batch -l ert -l /root/.emacs.d/tramp-hdfs.el -l /root/.emacs.d/tramp-hdfs-tests.el -f ert-run-tests-batch-and-exit
- No support for writing/modification of files.
- No support for acls.
Please open bugs at: https://github.com/raghavgautam/tramp-hdfs
To get tramp-debug logs:
(setq tramp-verbose 10)