Creating a Test File in HttpFS
Describes an example of test file using CURL in via HttpFS.
Example
-k \
> -i \
> -u mapr:mapr \
> -X PUT \
> -T /etc/passwd \
> -H 'Content-Type: application/octet-stream' \
> 'https://node7.cluster.com:14000/webhdfs/v1/tmp/testfile?op=CREATE&data=true'
HTTP/1.1 100 Continue
HTTP/1.1 201 Created
Date: Mon, 06 Jan 2025 13:42:04 GMT
Cache-Control: no-cache
Expires: Mon, 06 Jan 2025 13:42:04 GMT
Date: Mon, 06 Jan 2025 13:42:04 GMT
Pragma: no-cache
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Set-Cookie: hadoop.auth="u=mapr&p=mapr&t=multiauth&e=1736206924732&s=jXtc7u6u5mTNRuFu4M/Xl8KVMlCLbrFQ+g25n5p6a7U="; Path=/; Domain=.cluster.com; Secure; HttpOnly
Location: https://node7.cluster.com:14000/webhdfs/v1/tmp/testfile
Transfer-Encoding: chunked
{"Location":"https://node7.cluster.com:14000/webhdfs/v1/tmp/testfile"}[mapr@node7:~]$:
hadoop fs -ls /tmp/
Found 1 items
-rwxr-xr-x 3 mapr mapr 1835 2025-01-06 15:42 /tmp/testfile