Updated on 2024-04-02 GMT+08:00

Obtaining All Tables Using REST

Function

Use the REST service and transfer the URL consisting of the host and port to obtain all tables using HTTP.

Example Code

The following code snippets are in the getAllUserTables method in the HBaseRestTest class of the hbase-rest-example\src\main\java\com\huawei\hadoop\hbase\examples packet.

private void getAllUserTables(String url) { 
     String endpoint = "/"; 
     Optional<ResultModel> result = sendAction(url + endpoint, MethodType.GET, null); 
     handleNormalResult(result); 
 }