webhdfs - Hadoop Rest API for upload / download -


i trying perform upload/download file hadoop cluster, using c# app, couldn't find apis upload , download documentation.

so can please let me know how upload , download files hadoop using restapis?

thanks

you can use webhdfs rest api described here http://hadoop.apache.org/docs/r1.0.4/webhdfs.html

edit:

create , write file

step 1:

submit http put request without automatically following redirects , without sending file data.

curl -i -x put "http://:/webhdfs/v1/?op=create [&overwrite=][&blocksize=][&replication=] [&permission=][&buffersize=]"

the request redirected datanode file data written: http/1.1 307 temporary_redirect location: http://:/webhdfs/v1/?op=create... content-length: 0

step 2:

submit http put request using url in location header file data written.

curl -i -x put -t "http://:/webhdfs/v1/?op=create..."

the client receives 201 created response 0 content length , webhdfs uri of file in location header: http/1.1 201 created location: webhdfs://:/ content-length: 0

note reason of having two-step create/append preventing clients send out data before redirect. issue addressed "expect: 100-continue" header in http/1.1; see rfc 2616, section 8.2.3. unfortunately, there software library bugs (e.g. jetty 6 http server , java 6 http client), not correctly implement "expect: 100-continue". two-step create/append temporary workaround software library bugs.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -