aries-zhang
12/15/2017 - 9:37 AM

webhdfs-apis.sh

# List a directory
curl -i http://emoptestspk1:50070/webhdfs/v1/artifact?op=LISTSTATUS

# Delete a file
curl -i -X DELETE "http://emoptestspk1:50070/webhdfs/v1/artifact/aries-test?op=DELETE&recursive=true&user.name=hadoop"

# Create a file
curl -i -X PUT "http://emoptestspk1:50070/webhdfs/v1/artifact?op=CREATE"
curl -i -X PUT -T "ComX200 Guide.zip" "http://emoptestspk3:50075/webhdfs/v1/artifact/aries-test?op=CREATE&namenoderpcaddress=emoptestspk1:9000&createflag=&createparent=true&overwrite=false&user.name=hadoop"