联 系 我 们
售前咨询
售后咨询
微信关注:星环科技服务号
更多联系方式 >
5 Connect to Hippo
更新时间:12/18/2024, 6:52:22 AM

Default Port Information

The default port information for Hippo is listed below:

Table 12. Default Port Information
Configuration Items Description Configuration Addresses Port Number

http.port

Webserver port

  • “Config” tab of target Hippo service from Manager

  • Backend: /etc/hippo/conf/shiva-restful.sh

4567

httpserver.port

Restful API port

  • “Config” tab of target Hippo service from Manager

  • Backend: /etc/hippo/conf/elasticsearch.yml

8902

master.rpc_service.master_service_port

Shiva Master port

  • “Config” tab of target Hippo service from Manager

  • Backend: /etc/hippo/conf/master.conf

8630 - 8633

tabletserver.rpc_service.manage_service_port

Tablet Server port

  • “Config” tab of target Hippo service from Manager

  • Backend: /etc/hippo/conf/tabletserver.conf

8702- 8705

How to Connect

Users can connect to Hippo via Restful API, Python and Java now. Please refer to the samples shown below.

Restful API

curl -u shiva:shiva -XPUT 'ip:port/hippo/v1/{command}?pretty' -H 'Content-Type: application/json' -d'{}'
复制

Parameter description:

Table 13. Restful API Connection Parameters
Parameters Description Comments

-u

Specifies the username and password

Defaults to shiva:shiva

-XPUT

Request type

ip

IP of the node where Hippo HTTP Server is located

port

Port of Hippo HTTP Server

Defaults to 8902

Python API

The “hc” created by below commands is a management tool which can be used for tracking and managing connectivity status. If one connection drops, “hc” can automatically choose another available connection from the rest.

hc = HippoClient(["ip:port"], username = "", pwd = "")

## Users can add more “ip:port” as shown below, however username and password should stay the same
hc = HippoClient(["ip1:port","ip2:port"], username = "", pwd = "")
复制

Parameter description:

Table 14. Python API Connection Parameters
Parameters Description Comments

ip

IP of the node where Hippo HTTP Server is located

port

Port of Hippo HTTP Server

Defaults to 8902

username

Username

Defaults to shiva

pwd

Password

Defaults to shiva