KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
webhdfs
★ 89
Open GitHub ↗
Node.js WebHDFS REST API client
Download README (.md)
Explore Similar Repositories
hubot-mysql-chatops
:
ChatOps for MySQL.
hugo-snippets
:
Convenient partials, layouts and shortcodes for Hugo (gohugo.io)
alfred-appscripts
:
Alfred workflow to search and run/open AppleScripts for the active application
Lantern
:
Centec open source OpenFlow hardware implementation project (Lantern )
SharpDX_Demo
:
DirectX11 Tutorial based on SharpDx library
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
webhdfs
?
Download (.md)
node-webhdfs ============ [](https://travis-ci.org/harrisiirak/webhdfs) [](http://badge.fury.io/js/webhdfs) Hadoop WebHDFS REST API (2.2.0) client library for node.js with `fs` module like (asynchronous) interface. ## Examples Writing to the remote file: ```javascript var WebHDFS = require('webhdfs'); var hdfs = WebHDFS.createClient(); var localFileStream = fs.createReadStream('/path/to/local/file'); var remoteFileStream = hdfs.createWriteStream('/path/to/remote/file'); localFileStream.pipe(remoteFileStream); remoteFileStream.on('error', function onError (err) { // Do something with the error }); remoteFileStream.on('finish', function onFinish () { // Upload is done }); ``` Reading from the remote file: ```javascript var WebHDFS = require('webhdfs'); var hdfs = WebHDFS.createClient({ user: 'webuser', host: 'localhost', port: 80, path: '/webhdfs/v1' }); var remoteFileStream = hdfs.createReadStream('/path/to/remote/file'); remoteFileStream.on('error', function onError (err) { // Do something with the error }); remoteFileStream.on('data', function onChunk (chunk) { // Do something with the data chunk }); remoteFileStream.on('finish', function onFinish () { // Upload is done }); ``` ## TODO * Implement all calls (GETCONTENTSUMMARY, GETFILECHECKSUM, GETHOMEDIRECTORY, GETDELEGATIONTOKEN, RENEWDELEGATIONTOKEN, CANCELDELEGATIONTOKEN, SETREPLICATION, SETTIMES) * Improve documentation * More examples # Tests Running tests: ```bash npm test ``` # License MIT