An open API service indexing awesome lists of open source software.

https://github.com/damiencarol/jsr203-hadoop

A Java NIO file system provider for HDFS
https://github.com/damiencarol/jsr203-hadoop

hadoop hdfs java nio

Last synced: 6 months ago
JSON representation

A Java NIO file system provider for HDFS

Awesome Lists containing this project

README

          

jsr203-hadoop
=============

JSR 203 Implementation for Hadoop Distributed File System

[![Build Status](https://travis-ci.org/damiencarol/jsr203-hadoop.svg?branch=master)](https://travis-ci.org/damiencarol/jsr203-hadoop)
[![Coverage Status](https://coveralls.io/repos/damiencarol/jsr203-hadoop/badge.svg?branch=master&service=github)](https://coveralls.io/github/damiencarol/jsr203-hadoop?branch=master)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.jsr203hadoop/jsr203hadoop/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.jsr203hadoop/jsr203hadoop/)
[![Dependency Status](https://www.versioneye.com/user/projects/56c2fdbc18b2710036c8d4af/badge.svg)](https://www.versioneye.com/user/projects/56c2fdbc18b2710036c8d4af)
[![Codacy Badge](https://api.codacy.com/project/badge/grade/24aa7d876cac493e89512b88df3887ab)](https://www.codacy.com/app/damien-carol/jsr203-hadoop)
[![](https://jitpack.io/v/damiencarol/jsr203-hadoop.svg)](https://jitpack.io/#damiencarol/jsr203-hadoop)

#### Maven artifact

```xml

com.github.jsr203hadoop
jsr203hadoop
1.0.3

```

#### Prerequisites

`jsr203-hadoop` requires:
* Git
* Maven 3.0.4 (or higher)
* JDK 1.7 (or higher)

#### Download and build

```bash
$ 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.

#### Example

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

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

#### Status

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

* License: Apache License, Version 2.0.
* Author: Damien Carol
* Source code: http://github.com/damiencarol/jsr203-hadoop

#### Ressources

* JSR 203 NIO 2 spec
* Tutorial about NIO 2 from Oracle