We use proprietary and third party´s cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy
Cookies Policy
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi, it should be working now:

$ cat somedata.txt 
hi there
this is some random data
bla bla bla
yeah

bye!
$ curl -v -X PUT -T somedata.txt "http://cosmos.lab.fiware.org:14000/webhdfs/v1/user/frb/somedata.txt?op=create&user.name=frb" -H "X-auth-Token: MY_OAUTH2_TOKEN"
*   Trying 130.206.80.46...
* Connected to cosmos.lab.fiware.org (130.206.80.46) port 14000 (#0)
> PUT /webhdfs/v1/user/frb/somedata.txt?op=create&user.name=frb HTTP/1.1
> Host: cosmos.lab.fiware.org:14000
> User-Agent: curl/7.43.0
> Accept: */*
> X-auth-Token: MY_OAUTH2_TOKEN
> Content-Length: 57
> Expect: 100-continue
> 
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 307 Temporary Redirect
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: HEAD, POST, GET, OPTIONS, DELETE
< Access-Control-Allow-Headers: origin, content-type, X-Auth-Token, Tenant-ID, Authorization
< server: Apache-Coyote/1.1
< set-cookie: hadoop.auth="u=frb&p=frb&t=simple&e=1460755949222&s=kN3JIHw4eFReh1FCNry1nCQq1pc="; Version=1; Path=/
< location: http://cosmos.lab.fi-ware.org:14000/webhdfs/v1/user/frb/somedata.txt?op=CREATE&user.name=frb&data=true
< Content-Type: application/json; charset=utf-8
< content-length: 0
< date: Fri, 15 Apr 2016 11:32:28 GMT
< connection: close
< 
* Closing connection 0
$ curl -v -X PUT -T somedata.txt "http://cosmos.lab.fi-ware.org:14000/webhdfs/v1/user/frb/somedata.txt?op=CREATE&user.name=frb&data=true" -H "X-auth-Token: MY_OAUTH2_TOKEN" -H "Content-Type: application/octet-stream"
*   Trying 130.206.80.46...
* Connected to cosmos.lab.fi-ware.org (130.206.80.46) port 14000 (#0)
> PUT /webhdfs/v1/user/frb/somedata.txt?op=CREATE&user.name=frb&data=true HTTP/1.1
> Host: cosmos.lab.fi-ware.org:14000
> User-Agent: curl/7.43.0
> Accept: */*
> X-auth-Token: MY_OAUTH2_TOKEN
> Content-Type: application/octet-stream
> Content-Length: 57
> Expect: 100-continue
> 
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 201 Created
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: HEAD, POST, GET, OPTIONS, DELETE
< Access-Control-Allow-Headers: origin, content-type, X-Auth-Token, Tenant-ID, Authorization
< server: Apache-Coyote/1.1
< set-cookie: hadoop.auth="u=frb&p=frb&t=simple&e=1460756200287&s=xzsKIuBvrTcrTTYkgafTYI8qIDE="; Version=1; Path=/
< Content-Type: application/json; charset=utf-8
< content-length: 0
< date: Fri, 15 Apr 2016 11:36:40 GMT
< connection: close
< 
* Closing connection 0
$ curl -X GET "http://cosmos.lab.fi-ware.org:14000/webhdfs/v1/user/frb/somedata.txt?op=open&user.name=frb" -H "X-auth-Token: MY_OAUTH2_TOKEN"
hi there
this is some random data
bla bla bla
yeah

bye!