WebHDFS REST API and Spring Boot

141 views Asked by At

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,

1

There are 1 answers

0
OneCricketeer On

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