Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.46 KB

README.md

File metadata and controls

44 lines (29 loc) · 1.46 KB

gopher

HDFS Native Client for Go

GoDoc

This is a native golang client for hdfs. It connects directly to the namenode using the protocol buffers API.

It tries to be idiomatic by aping the stdlib os package, where possible, and implements the interfaces from it, including os.FileInfo and os.PathError.

Here's what it looks like in action:

client, _ := hdfs.New("namenode:8020")

file, _ := client.Open("/mobydick.txt")

buf := make([]byte, 59)
file.ReadAt(buf, 48847)

fmt.Println(string(buf))
// => Abominable are the tumblers into which he pours his poison.

For complete documentation, check out the Godoc.

Compatibility

This library uses "Version 9" of the HDFS protocol, which means it should work with hadoop distributions based on 2.2.x and above, as well as 3.x.

Acknowledgements

This library is heavily indebted to colinmarc. This is actually a fork of the project made by colinmarc. As the previous repo was not being maintained and I wanted some more functionalities to be added to the library, that's why I have created this repo.