Kate
Kate

Reputation: 165

WebHDFS REST API and Spring Boot

I have a Hadoop cluster and I want to manipulate data from a Spring Boot microservice: Create folders / Put Data/ Read Data/ Delete Data...

There is an API: https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/WebHDFS.html

but I don't know how I can use it in a spring boot project.

I found this example, but with HBASE: Spring Boot REST with Hadoop HBASE

Thank you in advance,

Upvotes: 0

Views: 245

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191728

You shouldn't use WebHDFS. Add hadoop-client Java dependency and use the Filesystem class to interact directly with HDFS via Namenode RPC

Otherwise, read the REST API documentation for WebHDFS and use WebClient class to construct HTTP requests

Upvotes: 0

Related Questions