hbase_rest()

Description:

Get cluster information and execute a complete HTTP request independently.

Syntax:

hbase_rest(restUrl, method, content; httpHeader1, httpHeader2, …)

Note:

The external library function gets cluster information and performs a certain operation on data, without creating an HBase connection in advance.

Parameters:

restUrl

The REST URL

method

An HTTP method, whose value is GET, PUT, POST or DELETE

content

An HTTP request message, which can be omitted when the current method does not submit one

httpHeader1/httpHeader2

The HTTP request header; can be omitted

Return value:

A table sequence

Example:

 

A

 

1

=hbase_rest("http://127.0.0.1:3456/namespaces","GET")

Query data using the GET method

 

 

 

2

<?xml version="1.0"  encoding="UTF-8"?>

 

<TableSchema  name="Orders">

 

  <ColumnSchema  name="infos" />

 

   <ColumnSchema  name="datas" />

 

</TableSchema>

 

 

3

 

=hbase_rest("http://127.0.0.1:3456/Orders/schema","PUT",A2;"Content-Type:text/xml","Accept: text/xml")

 

Handle data using the PUT method