Created on 10-12-201606:26 PM - edited 09-16-202201:36 AM
Configuring HTTPFS
To configure HTTPFS you can refer below post, it clearly explains the steps. We can install httpfs in any host where Hadoop clients are installed and we call it <HTTPFS_HOST>.
curl -i -X GET 'http://<HTTPFS_HOST>:14000/webhdfs/v1?user.name=hdfs&op=GETHOMEDIRECTORY'
Knox -> HTTPFS -> FileSystem
curl -u guest:guest-password -ik -X GET 'https://<KNOX_GATEWAY_HOST>:8443/gateway/example/webhdfs/v1?op=GETHOMEDIRECTORY' Here example is topology name
If above 2 commands gives response OK then your setup complete.
CURL command for knox to access HDFS via HttpFS
Below are curl commands for few HDFS operations.
1. Make Directory
curl -u guest:guest-password -ik -X PUT 'https://<KNOX_GATEWAY_HOST>:8443/gateway/example/webhdfs/v1/tmp/TestKnoxHDFS/testFullUseCase?op=MKDIRS'