JSR 203 Implementation for Hadoop Distributed File System
<dependency>
<groupId>com.github.jsr203hadoop</groupId>
<artifactId>jsr203hadoop</artifactId>
<version>1.0.3</version>
</dependency>
jsr203-hadoop
requires:
- Git
- Maven 3.0.4 (or higher)
- JDK 1.7 (or higher)
$ git clone git://github.com/damiencarol/jsr203-hadoop.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.
- License: Apache License, Version 2.0.
- Author: Damien Carol
- Source code: http://github.com/damiencarol/jsr203-hadoop