Using the DSEFS REST interface

DSEFS provides a REST interface that implements the commands from WebHDFS.

The REST interface is enabled on all DSE nodes running DSEFS. It is available at the following base URI: http://<node_hostname_or_IP_address>:5598/webhdfs/v1

For example from a terminal using the curl command:

curl -L -X PUT 'localhost:5598/webhdfs/v1/fs/a/b/c/d/e?op=MKDIRS' &&
curl -L -X PUT -T logfile.txt '127.0.0.1:5598/webhdfs/v1/fs/log?op=CREATE&overwrite=true&blocksize=50000&rf=1' &&
curl -L -X POST -T logfile.txt 'localhost:5598/webhdfs/v1/fs/log?op=APPEND'

If the DSE cluster has authentication enabled, use the curl --location-trusted parameter when the WebHDFS noredirect parameter is false (the default value).

Or from the DSE Spark shell:

val rdd1 = sc.textFile("webhdfs://localhost:5598/webhdfs/v1/fs/log")

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com