Skip to content
A Java NIO file system provider for HDFS
Branch: master
Clone or download
Latest commit d36a4b0 Nov 5, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Allow unspecified (null) HDFS host in Path URI if it is defined by fs… Jul 4, 2016
tool Add too for codacy coverage. Mar 24, 2016
.gitignore Adding *.iml to gitignore. Nov 15, 2014
.travis.yml Update .travis.yml Mar 23, 2016
NOTICE Fix license issue (add APACHE-2, removed ORacle licensed files) Mar 24, 2014 Update Jun 7, 2016
checkstyle.xml Add checkstyle to enforce consistent source formatting. Jan 27, 2016
pom.xml Update pom.xml Nov 5, 2016


JSR 203 Implementation for Hadoop Distributed File System

Build Status Coverage Status Maven Central Dependency Status Codacy Badge

Maven artifact



jsr203-hadoop requires git, maven (3.0.4 or later), and JDK 1.7 or later.

Download and build

$ git clone git://
$ cd jsr203-hadoop
$ mvn install

Use mvn -DskipTests if you do not want to execute the tests.


jsr203-hadoop provide NIO 2 access to your HDFS cluster. For example, you can build URI starts with hdfs://<namebode>:<port> and use standard NIO API :

URI uri = new URI("hdfs://" + host + ":" + port + "/somefile");
Path file = Paths.get(uri);
System.out.println("File [" + file.toString() + "] exists = '" + Files.exists(file) + "'");


This project is still a beta.

The following features are complete.

Feature Status Description
Path support - build from string/URI Done
Path support - resolve, relativize, equals, ... Done
Directory stream (provide ability to list files in directory, get status, ...) Done
Create/delete file/directory Done
Input/Output Partial Full support of SeekableByteChannel, FileChannel pending
Attribute view "basic" Done Full support (fileKey is implemented)
Attribute view "owner" Done Full support (Use Hadoop UGI)
Attribute view "posix" Done
Hadoop dedicated view "hadoop" for hadoop specific attributes (len, block size, replication factor) Done More attributes will come

More features will come :

  • Security and permissions
  • complete list of hadoop specific attributes

For more details, see the Reference guide.

More information


You can’t perform that action at this time.