{"id":37175445,"url":"https://github.com/emcfarlane/hdfs","last_synced_at":"2026-01-14T20:29:05.974Z","repository":{"id":57578129,"uuid":"132894620","full_name":"emcfarlane/hdfs","owner":"emcfarlane","description":"A native go client for HDFS","archived":false,"fork":true,"pushed_at":"2018-06-01T10:20:15.000Z","size":1208,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T09:37:30.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"colinmarc/hdfs","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emcfarlane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-10T12:03:45.000Z","updated_at":"2018-05-10T12:03:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/emcfarlane/hdfs","commit_stats":null,"previous_names":["afking/hdfs"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/emcfarlane/hdfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Fhdfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Fhdfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Fhdfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Fhdfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emcfarlane","download_url":"https://codeload.github.com/emcfarlane/hdfs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Fhdfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T20:29:05.414Z","updated_at":"2026-01-14T20:29:05.961Z","avatar_url":"https://github.com/emcfarlane.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"HDFS for Go\n===========\n\n[![GoDoc](https://godoc.org/github.com/colinmarc/hdfs/web?status.svg)](https://godoc.org/github.com/colinmarc/hdfs) [![build](https://travis-ci.org/colinmarc/hdfs.svg?branch=master)](https://travis-ci.org/colinmarc/hdfs)\n\nThis is a native golang client for hdfs. It connects directly to the namenode using\nthe protocol buffers API.\n\nIt tries to be idiomatic by aping the stdlib `os` package, where possible, and\nimplements the interfaces from it, including `os.FileInfo` and `os.PathError`.\n\nHere's what it looks like in action:\n\n```go\nclient, _ := hdfs.New(\"namenode:8020\")\n\nfile, _ := client.Open(\"/mobydick.txt\")\n\nbuf := make([]byte, 59)\nfile.ReadAt(buf, 48847)\n\nfmt.Println(string(buf))\n// =\u003e Abominable are the tumblers into which he pours his poison.\n```\n\nFor complete documentation, check out the [Godoc][1].\n\nThe `hdfs` Binary\n-----------------\n\nAlong with the library, this repo contains a commandline client for HDFS. Like\nthe library, its primary aim is to be idiomatic, by enabling your favorite unix\nverbs:\n\n\n    $ hdfs --help\n    Usage: hdfs COMMAND\n    The flags available are a subset of the POSIX ones, but should behave similarly.\n\n    Valid commands:\n      ls [-lah] [FILE]...\n      rm [-rf] FILE...\n      mv [-fT] SOURCE... DEST\n      mkdir [-p] FILE...\n      touch [-amc] FILE...\n      chmod [-R] OCTAL-MODE FILE...\n      chown [-R] OWNER[:GROUP] FILE...\n      cat SOURCE...\n      head [-n LINES | -c BYTES] SOURCE...\n      tail [-n LINES | -c BYTES] SOURCE...\n      du [-sh] FILE...\n      checksum FILE...\n      get SOURCE [DEST]\n      getmerge SOURCE DEST\n      put SOURCE DEST\n\nSince it doesn't have to wait for the JVM to start up, it's also a lot faster\n`hadoop -fs`:\n\n    $ time hadoop fs -ls / \u003e /dev/null\n\n    real  0m2.218s\n    user  0m2.500s\n    sys 0m0.376s\n\n    $ time hdfs ls / \u003e /dev/null\n\n    real  0m0.015s\n    user  0m0.004s\n    sys 0m0.004s\n\nBest of all, it comes with bash tab completion for paths!\n\nInstalling the library\n----------------------\n\nTo install the library, once you have Go [all set up][2]:\n\n    $ go get -u github.com/colinmarc/hdfs\n\nInstalling the commandline client\n---------------------------------\n\nGrab a tarball from the [releases page](https://github.com/colinmarc/hdfs/releases)\nand unzip it wherever you like.\n\nYou'll want to add the following line to your `.bashrc` or `.profile`:\n\n    export HADOOP_NAMENODE=\"namenode:8020\"\n\nTo install tab completion globally on linux, copy or link the `bash_completion`\nfile which comes with the tarball into the right place:\n\n    ln -sT bash_completion /etc/bash_completion.d/gohdfs\n\nBy default, the HDFS user is set to the currently-logged-in user. You can\noverride this in your `.bashrc` or `.profile`:\n\n    export HADOOP_USER_NAME=username\n\nCompatibility\n-------------\n\nThis library uses \"Version 9\" of the HDFS protocol, which means it should work\nwith hadoop distributions based on 2.2.x and above. The tests run against CDH\n5.x and HDP 2.x.\n\nAcknowledgements\n----------------\n\nThis library is heavily indebted to [snakebite][3].\n\n[1]: https://godoc.org/github.com/colinmarc/hdfs\n[2]: https://golang.org/doc/install\n[3]: https://github.com/spotify/snakebite\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcfarlane%2Fhdfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femcfarlane%2Fhdfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcfarlane%2Fhdfs/lists"}